diff options
-rw-r--r-- | .gitea/workflows/develop-qt5.yml | 43 | ||||
-rw-r--r-- | .gitea/workflows/develop-qt6.yml | 45 | ||||
-rw-r--r-- | .github/workflows/codeql-analysis.yml | 56 | ||||
-rw-r--r-- | .github/workflows/doxygen-genration.yml | 33 | ||||
-rw-r--r-- | .github/workflows/release-qt5.yml | 25 | ||||
-rw-r--r-- | .github/workflows/release.yml | 25 | ||||
-rw-r--r-- | .github/workflows/testing-nightly.yml | 25 | ||||
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | scripts/copyright_checking.py | 33 | ||||
-rw-r--r-- | src/core/utils/BuildInfoUtils.cpp | 27 |
10 files changed, 260 insertions, 64 deletions
diff --git a/.gitea/workflows/develop-qt5.yml b/.gitea/workflows/develop-qt5.yml index 09d251b5..d0958f79 100644 --- a/.gitea/workflows/develop-qt5.yml +++ b/.gitea/workflows/develop-qt5.yml @@ -1,19 +1,44 @@ +# Copyright (C) 2021-2024 Saturneric <[email protected]> +# +# This file is part of GpgFrontend. +# +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: Develop CI Qt5 on: push: - branches: [ main, 'develop', 'dev/**' ] + branches: [main, develop, "dev/**"] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" pull_request: - branches: [ main, 'develop', 'dev/**' ] + branches: [main, develop, "dev/**"] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" env: - BUILD_TYPE: Release + BUILD_TYPE: Debug jobs: build: @@ -21,7 +46,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - lfs: 'false' + lfs: "false" submodules: recursive - name: Install Dependence @@ -57,7 +82,7 @@ jobs: ./linuxdeployqt-continuous-x86_64.AppImage ${{github.workspace}}/build/artifacts/AppDir/usr/share/applications/*.desktop -no-translations -extra-plugins=iconengines,platforms/libqoffscreen.so -appimage -unsupported-allow-new-glibc echo "BUILD_TYPE_LOWER=${BUILD_TYPE,,}" >> ${GITHUB_ENV} echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> ${GITHUB_ENV} - + - name: Run Unit Tests run: | cd ${{github.workspace}}/build/final-artifact diff --git a/.gitea/workflows/develop-qt6.yml b/.gitea/workflows/develop-qt6.yml index a385f2fb..34c3a894 100644 --- a/.gitea/workflows/develop-qt6.yml +++ b/.gitea/workflows/develop-qt6.yml @@ -1,19 +1,44 @@ +# Copyright (C) 2021-2024 Saturneric <[email protected]> +# +# This file is part of GpgFrontend. +# +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: Develop CI Qt6 on: push: - branches: [ main, 'develop', 'dev/**' ] + branches: [main, develop, "dev/**"] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" pull_request: - branches: [ main, 'develop', 'dev/**' ] + branches: [main, develop, "dev/**"] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" env: - BUILD_TYPE: Release + BUILD_TYPE: Debug jobs: build: @@ -21,7 +46,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - lfs: 'false' + lfs: "false" submodules: recursive - name: Get Short SHA of Commit @@ -45,7 +70,7 @@ jobs: ninja sudo ninja install - - name: Build & Install Full SDK + - name: Build & Install Full SDK run: | cmake -B ${{github.workspace}}/build-full-sdk -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_FULL_SDK=ON cmake --build ${{github.workspace}}/build-full-sdk --config {{$env.BUILD_TYPE}} -- -v @@ -56,7 +81,7 @@ jobs: cmake -S ${{github.workspace}}/modules -B ${{github.workspace}}/modules/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/modules/build/artifacts cmake --build ${{github.workspace}}/modules/build --config {{$env.BUILD_TYPE}} -- -v cmake --install ${{github.workspace}}/modules/build --config {{$env.BUILD_TYPE}} - + - name: Build GpgFrontend run: | cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDGPGFRONTEND_BUILD_TYPE_ONLY_APPLICATION=ON diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1b4d37dc..028335b3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,23 +1,37 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. +# Copyright (C) 2021-2024 Saturneric <[email protected]> # -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. +# This file is part of GpgFrontend. # -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: "CodeQL" on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] schedule: - - cron: '19 14 * * 2' + - cron: "19 14 * * 2" env: BUILD_TYPE: Debug @@ -34,15 +48,15 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp' ] + language: ["cpp"] steps: - name: Checkout repository uses: actions/checkout@v4 with: - lfs: 'false' + lfs: "false" submodules: recursive - + - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: @@ -56,7 +70,7 @@ jobs: sudo apt-get -y install libarchive-dev libgpgme-dev sudo apt-get -y install gpg - - name: Build gpg-error (Linux) + - name: Build gpg-error run: | git clone --depth 1 --branch libgpg-error-1.47 git://git.gnupg.org/libgpg-error.git ${{github.workspace}}/third_party/libgpg-error cd ${{github.workspace}}/third_party/libgpg-error @@ -65,7 +79,7 @@ jobs: sudo make install cd ${{github.workspace}} - - name: Build assuan (Linux) + - name: Build assuan run: | git clone --depth 1 --branch libassuan-2.5.6 git://git.gnupg.org/libassuan.git ${{github.workspace}}/third_party/libassuan cd ${{github.workspace}}/third_party/libassuan @@ -74,7 +88,7 @@ jobs: sudo make install cd ${{github.workspace}} - - name: Build GpgME (Linux) + - name: Build GpgME run: | git clone --depth 1 --branch gpgme-1.22.0 git://git.gnupg.org/gpgme.git ${{github.workspace}}/third_party/gpgme cd ${{github.workspace}}/third_party/gpgme @@ -83,7 +97,7 @@ jobs: sudo make install cd ${{github.workspace}} - - name: Build googletest (Linux) + - name: Build googletest run: | git clone --depth 1 --branch v1.15.0 https://github.com/google/googletest.git ${{github.workspace}}/third_party/googletest cd ${{github.workspace}}/third_party/googletest @@ -95,10 +109,10 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3 with: - version: '6.7.2' - cache: 'true' + version: "6.7.2" + cache: "true" - - name: Configure CMake && Build GpgFrontend + - name: Configure CMake && Build GpgFrontend run: | cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_STABLE=ON cmake --build ${{github.workspace}}/build --config {{$env.BUILD_TYPE}} -- -v diff --git a/.github/workflows/doxygen-genration.yml b/.github/workflows/doxygen-genration.yml index c23da8d2..112cc7a2 100644 --- a/.github/workflows/doxygen-genration.yml +++ b/.github/workflows/doxygen-genration.yml @@ -1,11 +1,36 @@ +# Copyright (C) 2021-2024 Saturneric <[email protected]> +# +# This file is part of GpgFrontend. +# +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: Doxygen Generation on: push: - branches: [ main, 'develop' ] + branches: [main] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" jobs: build: @@ -22,4 +47,4 @@ jobs: message: | { "branch": "${{github.ref}}" - }
\ No newline at end of file + } diff --git a/.github/workflows/release-qt5.yml b/.github/workflows/release-qt5.yml index 43de5317..13583d48 100644 --- a/.github/workflows/release-qt5.yml +++ b/.github/workflows/release-qt5.yml @@ -1,3 +1,28 @@ +# Copyright (C) 2021-2024 Saturneric <[email protected]> +# +# This file is part of GpgFrontend. +# +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: Build Release (Qt5) on: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d28b3847..fae2bbec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,28 @@ +# Copyright (C) 2021-2024 Saturneric <[email protected]> +# +# This file is part of GpgFrontend. +# +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: Build Release on: diff --git a/.github/workflows/testing-nightly.yml b/.github/workflows/testing-nightly.yml index 9a6df0bf..aabaaa35 100644 --- a/.github/workflows/testing-nightly.yml +++ b/.github/workflows/testing-nightly.yml @@ -1,3 +1,28 @@ +# Copyright (C) 2021-2024 Saturneric <[email protected]> +# +# This file is part of GpgFrontend. +# +# GpgFrontend is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GpgFrontend is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. +# +# The initial version of the source code is inherited from +# the gpg4usb project, which is under GPL-3.0-or-later. +# +# All the source code of GpgFrontend was modified and released by +# Saturneric <[email protected]> starting on May 12, 2021. +# +# SPDX-License-Identifier: GPL-3.0-or-later + name: Build Nightly on: @@ -3,8 +3,8 @@   [](https://www.codacy.com/gh/saturneric/GpgFrontend/dashboard?utm_source=github.com&utm_medium=referral&utm_content=saturneric/GpgFrontend&utm_campaign=Badge_Grade) -[](https://app.fossa.com/projects/git%2Bgithub.com%2Fsaturneric%2FGpgFrontend?ref=badge_small) -[](https://github.com/saturneric/GpgFrontend/actions/workflows/release.yml) +[](https://github.com/saturneric/GpgFrontend/actions/workflows/release.yml) +[](https://github.com/saturneric/GpgFrontend/actions/workflows/testing-nightly.yml) GpgFrontend is a free, open-source, robust yet user-friendly, compact and cross-platform tool for [OpenPGP](https://www.openpgp.org/) encryption. It @@ -43,8 +43,9 @@ GpgFrontend is **PERMANENTLY FREE** of charge. However, you can support us by ## User Manual -GpgFrontend provides documentations on its main features. If you want to know how to install, please -read the [User Manual](https://www.gpgfrontend.bktus.com/overview/glance) instead of README. +GpgFrontend provides documentations on its main features. If you want to know +how to install, please read the [User +Manual](https://www.gpgfrontend.bktus.com/overview/glance) instead of README. The code for the user manual is maintained in [this repository](https://github.com/saturneric/GpgFrontend-Manual.git). @@ -92,7 +93,8 @@ development of new modules and the introduction of API interfaces. ## Contact -Please refer to [HERE](https://www.gpgfrontend.bktus.com/overview/contact) for my contact details. +Please refer to [HERE](https://www.gpgfrontend.bktus.com/overview/contact) for +my contact details. ## Contributing & Bugs Report diff --git a/scripts/copyright_checking.py b/scripts/copyright_checking.py index c03ca558..72f28874 100644 --- a/scripts/copyright_checking.py +++ b/scripts/copyright_checking.py @@ -29,7 +29,7 @@ copyright_text_source = """/** * */""" - # copyright text for script files +# copyright text for script files copyright_text_script = """# Copyright (C) 2021-2024 Saturneric <[email protected]> # # This file is part of GpgFrontend. @@ -56,20 +56,23 @@ copyright_text_script = """# Copyright (C) 2021-2024 Saturneric <[email protected]> # SPDX-License-Identifier: GPL-3.0-or-later """ + def check_copright_by_path(path, copyright_text, suffix): - for root, _, files in os.walk(path): - for file in files: - if file.endswith(suffix): - file_path = os.path.join(root, file) - with open(file_path, 'r', encoding='utf-8') as f: - content = f.read() - if copyright_text not in content: - print(f"copyright declaration missing: {file_path}") + for root, _, files in os.walk(path): + for file in files: + if file.endswith(suffix): + file_path = os.path.join(root, file) + with open(file_path, "r", encoding="utf-8") as f: + content = f.read() + if copyright_text not in content: + print(f"copyright declaration missing: {file_path}") + + +check_copright_by_path("src", copyright_text_source, (".c", ".cpp", ".h", ".hpp")) +check_copright_by_path("src", copyright_text_script, (".txt")) +check_copright_by_path("src", copyright_text_script, (".txt")) +check_copright_by_path("modules", copyright_text_source, (".c", ".cpp", ".h", ".hpp")) +check_copright_by_path("modules", copyright_text_script, (".txt")) -check_copright_by_path("src", copyright_text_source, ('.c', '.cpp', '.h', '.hpp')) -check_copright_by_path("src", copyright_text_script, ('.txt')) -check_copright_by_path("src", copyright_text_script, ('.txt')) -check_copright_by_path("modules", copyright_text_script, ('.txt')) -check_copright_by_path("modules", copyright_text_script, ('.c', '.cpp', '.h', '.hpp')) -print("check done")
\ No newline at end of file +print("copyright check done") diff --git a/src/core/utils/BuildInfoUtils.cpp b/src/core/utils/BuildInfoUtils.cpp index 65a0b43a..9e5314b5 100644 --- a/src/core/utils/BuildInfoUtils.cpp +++ b/src/core/utils/BuildInfoUtils.cpp @@ -1,3 +1,30 @@ +/** + * Copyright (C) 2021-2024 Saturneric <[email protected]> + * + * This file is part of GpgFrontend. + * + * GpgFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GpgFrontend is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from + * the gpg4usb project, which is under GPL-3.0-or-later. + * + * All the source code of GpgFrontend was modified and released by + * Saturneric <[email protected]> starting on May 12, 2021. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ #include "BuildInfoUtils.h" |