Skip to content

Commit

Permalink
fix: solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
saturneric committed Dec 22, 2022
2 parents b244320 + b15bf4b commit 3cb623b
Show file tree
Hide file tree
Showing 58 changed files with 1,420 additions and 347 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
if: matrix.os == 'windows-latest' || matrix.os == 'macos-10.15'
if: matrix.os == 'windows-latest' || matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- uses: actions/checkout@v2
with:
Expand All @@ -58,7 +58,7 @@ jobs:
brew unlink gettext && brew link --force gettext
brew link qt@5
brew link [email protected] --force
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Build gpg-error (Linux)
run: |
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
run: |
cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_TEST_UI=ON
cmake --build ${{github.workspace}}/build --config {{$env.BUILD_TYPE}} -- -v
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Configure CMake & Build Binary(Windows)
shell: msys2 {0}
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
with:
name: gpgfrontend-${{matrix.os}}-${{env.BUILD_TYPE}}-${{steps.vars.outputs.sha_short}}
path: ${{github.workspace}}/build/release/*
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Upload Artifact(Windows)
uses: actions/upload-artifact@master
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
if: matrix.os == 'windows-2019' || matrix.os == 'macos-10.15'
if: matrix.os == 'windows-2019' || matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- uses: actions/checkout@v2
with:
Expand All @@ -46,7 +46,7 @@ jobs:
sudo apt-get update
sudo apt-get -y install build-essential binutils git autoconf automake gettext texinfo
sudo apt-get -y install gcc-8 g++-8 ninja-build
sudo apt-get -y install libconfig++-dev libboost-all-dev libarchive-dev libssl-dev
sudo apt-get -y install libconfig++-dev libarchive-dev libssl-dev
sudo apt-get -y install gpgsm libxcb-xinerama0 libxcb-icccm4-dev libcups2-dev libdrm-dev libegl1-mesa-dev
sudo apt-get -y install libgcrypt11-dev libnss3-dev libpci-dev libpulse-dev libudev-dev libxtst-dev gyp
sudo apt-get -y install libglu1-mesa-dev libfontconfig1-dev libx11-xcb-dev libicu-dev libxcb-image0
Expand All @@ -57,6 +57,23 @@ jobs:
sudo update-alternatives --set g++ "/usr/bin/g++-8"
if: matrix.os == 'ubuntu-18.04'

- name: Install Boost (Linux)
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
boost_version: 1.78.0
# OPTIONAL: Specify a platform version
platform_version: 18.04
# OPTIONAL: Specify an architecture
arch: x86

# NOTE: If a boost version matching all requirements cannot be found,
# this build step will fail
if: matrix.os == 'ubuntu-18.04'

- name: Codesign Configuration (macOS)
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
Expand All @@ -75,7 +92,7 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Install Dependence (macOS)
run: |
Expand All @@ -84,7 +101,7 @@ jobs:
brew unlink gettext && brew link --force gettext
brew link qt@5
brew link [email protected] --force
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Build gpg-error (Linux)
run: |
Expand Down Expand Up @@ -147,7 +164,7 @@ jobs:
- name: Build GpgFrontend (Linux)
# Build your GpgFrontend with the given configuration
run: |
cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOOST_ROOT=${{steps.install-boost.outputs.BOOST_ROOT}}
cmake --build ${{github.workspace}}/build --config {{$env.BUILD_TYPE}} -- -v
if: matrix.os == 'ubuntu-18.04'

Expand All @@ -169,7 +186,7 @@ jobs:
xcodebuild -exportArchive -archivePath ${{github.workspace}}/build/GpgFrontend.xcarchive \
-exportOptionsPlist ${{github.workspace}}/build/ExportOptions.plist \
-exportPath ${{github.workspace}}/build/package/
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Package & Sign App Bundle (macOS)
run: |
Expand All @@ -184,7 +201,7 @@ jobs:
${{github.workspace}}/build/artifactOut/GpgFrontend-${{steps.vars.outputs.sha_short}}-x86_64.dmg
mv ${{github.workspace}}/build/GpgFrontend.app.zip \
${{github.workspace}}/build/GpgFrontend-${{steps.vars.outputs.sha_short}}-x86_64.zip
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Notarize Release Build (macOS)
run: |
Expand All @@ -193,7 +210,7 @@ jobs:
--primary-bundle-id ${{secrets.GPGFRONTEND_XOCDE_APPID}} \
-u ${{secrets.APPLE_DEVELOPER_ID}} \
-p ${{secrets.APPLE_DEVELOPER_ID_SECRET}}
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Package App Image (Linux)
run: |
Expand Down Expand Up @@ -226,7 +243,7 @@ jobs:
with:
name: gpgfrontend-${{matrix.os}}-${{env.BUILD_TYPE}}-${{steps.vars.outputs.sha_short}}
path: ${{github.workspace}}/build/artifactOut/*
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11' || matrix.os == 'macos-12'

- name: Upload Artifact(Windows)
uses: actions/upload-artifact@master
Expand Down
16 changes: 8 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[submodule "third_party/gpgme"]
path = third_party/gpgme
url = https://github.com/saturneric/gpgme
url = https://git.bktus.com/GnuPG/gpgme.git
[submodule "third_party/libassuan"]
path = third_party/libassuan
url = https://github.com/saturneric/libassuan
url = https://git.bktus.com/GnuPG/libassuan.git
[submodule "third_party/libgpg-error"]
path = third_party/libgpg-error
url = https://github.com/saturneric/libgpg-error
url = https://git.bktus.com/GnuPG/libgpg-error.git
[submodule "third_party/json"]
path = third_party/json
url = https://github.com/saturneric/json
url = https://git.bktus.com/GpgFrontend/json.git
[submodule "third_party/easyloggingpp"]
path = third_party/easyloggingpp
url = https://github.com/saturneric/easyloggingpp
url = https://git.bktus.com/GpgFrontend/easyloggingpp.git
[submodule "third_party/qt-aes"]
path = third_party/qt-aes
url = https://github.com/saturneric/Qt-AES
url = https://git.bktus.com/GpgFrontend/Qt-AES.git
[submodule "third_party/libarchive"]
path = third_party/libarchive
url = https://github.com/saturneric/libarchive.git
url = https://git.bktus.com/GpgFrontend/libarchive.git
[submodule "third_party/libconfig"]
path = third_party/libconfig
url = https://github.com/saturneric/libconfig
url = https://git.bktus.com/GpgFrontend/libconfig.git
37 changes: 34 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
cmake_minimum_required(VERSION 3.16)

# define project
project(GpgFrontend VERSION 2.0.9 LANGUAGES CXX)
project(GpgFrontend VERSION 2.0.10 LANGUAGES CXX)

# show cmake version
message(STATUS "GpgFrontend Build Configuration Started CMAKE Version ${CMAKE_VERSION}")
Expand Down Expand Up @@ -56,6 +56,8 @@ option(GPGFRONTEND_BUILD_TYPE_STABLE
"Generate release version" ON)
option(GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE "Generate an installable version" OFF)
option(GPGFRONTEND_GENERATE_APP_PACKAGE_DEB "Generate DEB package" OFF)
option(GPGFRONTEND_GENERATE_APP_PACKAGE_RPM "Generate RPM package" OFF)
option(GPGFRONTEND_GENERATE_APP_PACKAGE_FREEBSD "Generate PKG package" OFF)
option(GPGFRONTEND_CONFIGURE_FOR_XCODE_BUILD "Generate a version that can be successfully compiled and packaged in Xcode" OFF)
option(GPGFRONTEND_XCODE_TEAM_ID "GpgFrontend Apple Team ID" "NONE")
option(GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY "GpgFrontend Signing Certificate" "NONE")
Expand Down Expand Up @@ -108,11 +110,21 @@ if (GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE)
set(GPGFRONTEND_GENERATE_APP_PACKAGE_DEB 1)
endif ()

# linux package build
# linux package build deb
if (GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE AND GPGFRONTEND_GENERATE_APP_PACKAGE_DEB)
set(APP_PACKAGE_DEB 1)
endif ()

# linux package build rpm
if (GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE AND GPGFRONTEND_GENERATE_APP_PACKAGE_RPM)
set(APP_PACKAGE_RPM 1)
endif ()

# linux package build pkg
if (GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE AND GPGFRONTEND_GENERATE_APP_PACKAGE_FREEBSD)
set(APP_PACKAGE_FREEBSD 1)
endif ()

# xcode archive build
if (GPGFRONTEND_CONFIGURE_FOR_XCODE_BUILD)
set(GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE 0)
Expand Down Expand Up @@ -333,6 +345,16 @@ if (LINUX)
set(OS_PLATFORM 2)
ADD_DEFINITIONS(-DLINUX)

# Get Env Info
exec_program(uname OUTPUT_VARIABLE SYSTEM_NAME)
set(SYSTEM_NAME "${SYSTEM_NAME}" CACHE INTERNAL "")

if(SYSTEM_NAME STREQUAL "FreeBSD")
message(STATUS "FreeBSD BOX")
ADD_DEFINITIONS(-DFREEBSD)
set(FREEBSD TRUE)
endif()

message(STATUS "GCC Version ${CMAKE_CXX_COMPILER_VERSION}")
if (CMAKE_CXX_COMPILER_VERSION LESS 9)
message(STATUS "GCC CXX_FLAGS add filesystem support manually")
Expand Down Expand Up @@ -421,8 +443,17 @@ endif ()
SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)

# disable myeasylog.log
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DELPP_NO_DEFAULT_LOG_FILE")

# Introduce boost
find_package(Boost COMPONENTS date_time system REQUIRED)
if(NOT BOOST_ROOT)
find_package(Boost COMPONENTS date_time system REQUIRED)
else()
find_package(Boost
COMPONENTS date_time system REQUIRED
PATHS ${BOOST_ROOT} NO_DEFAULT_PATH)
endif()

# Introduce OpenSSL
if(APPLE)
Expand Down
1 change: 1 addition & 0 deletions TRANSLATORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Translators:
Fabian Hêche <[email protected]> (fr_FR)
huzpsb <[email protected]> (zh_CN)
Google Translation Machine

Reviewers:
Expand Down
4 changes: 2 additions & 2 deletions manual/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ It is recommended to use plain text to contact me by email, but HTML is not reco

Name: Saturneric, Eric or Erich.

Email: [[email protected]](mailto:[email protected])
Email: [[email protected]](mailto:[email protected]) (Hosted in the Federal Republic of Germany)

Tips: BKTUS(Bakantu Union) is not a company, it is my personal domain name.
Tips: BKTUS(Bakantu union us) is not a company, it is my personal domain name.

## Languages

Expand Down
13 changes: 11 additions & 2 deletions manual/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
GpgFrontend is a cross-platform encryption tool that conforms to the OpenPGP standard. It is committed to making OpenPGP
easier to use, so that more people can use the tool to protect their privacy.

## Relationship with OpenPGP(pgp) and Gnupg(gpg)?
## Relationship between OpenPGP(pgp) and Gnupg(gpg)?

OpenPGP is a data encryption and decryption standard, and GpgFrontend supports it. GnuPG is a cryptographic software
used to encrypt, sign communication content and manage keys for asymmetric cryptography. It follows the OpenPGP
Expand All @@ -14,7 +14,7 @@ standard. GpgFrontend drives gnupg at runtime to implement operations such as en
## How to obtain and use GpgFrontend?

The various versions of GpgFrontend will be released in the GitHub repository, and you can find and download the latest
version in Releases. After downloading, you can refer to the instructions in ReadME and you can start using it in just a
version [HERE](https://www.gpgfrontend.pub/#/downloads). After downloading, you can refer to the instructions in ReadME and you can start using it in just a
few steps.

## I found some flaws in GpgFrontend, what should I do?
Expand Down Expand Up @@ -44,3 +44,12 @@ released, and release a stable version at an appropriate time.

But starting from 2.0.0, BETA versions will not be released unless there are special circumstances.

## How to deal with 'ENV Loading Failed'?

The reason for this problem is that GpgFrontend failed to find the GnuGP tool in your computer.

- For macOS users, please install GnuPG for OSX [Here](https://sourceforge.net/p/gpgosx/docu/Download/).
- For Linux users, please install gnupg through apt or yum.
- For Windows users, GnuPG is now integrated in the latest version of GpgFrontend, we recommend you to download the
latest GpgFrontend.

33 changes: 23 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ if (APPLICATION_BUILD)
else ()
message(STATUS "Link Application Library For Linux")
target_link_libraries(${AppName} crypto pthread)
# link for freebsd
if(FREEBSD)
target_link_libraries(${AppName} intl)
endif()
# issue on filesystem support of gcc
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 9.0)
target_link_libraries(${AppName} stdc++fs)
Expand Down Expand Up @@ -315,15 +319,8 @@ if (LINUX AND LINUX_INSTALL_SOFTWARE)
DESTINATION ${CMAKE_INSTALL_FULL_LOCALEDIR})
endif ()

cmake_host_system_information(RESULT PRETTY_NAME QUERY DISTRIB_PRETTY_NAME)
cmake_host_system_information(RESULT DISTRO QUERY DISTRIB_INFO)

foreach(VAR IN LISTS DISTRO)
message(STATUS "${VAR}=`${${VAR}}`")
endforeach()

if (APP_PACKAGE_DEB)
message(STATUS "Configure Deb Package")
message(STATUS "Configure DEB Package")
SET(CPACK_GENERATOR "DEB")
set(CPACK_INSTALL_PREFIX "/usr/local/")
set(CPACK_PACKAGE_NAME "gpgfrontend")
Expand All @@ -345,8 +342,9 @@ if (LINUX AND LINUX_INSTALL_SOFTWARE)
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
include(CPack)
endif ()
if (APP_PACKAGE_RPM)
message(STATUS "Configure Rpm Package")

if (APP_PACKAGE_RPM)
message(STATUS "Configure RPM Package")
SET(CPACK_GENERATOR "RPM")
set(CPACK_INSTALL_PREFIX "/usr/local/")
set(CPACK_PACKAGE_NAME "gpgfrontend")
Expand All @@ -360,6 +358,21 @@ if (LINUX AND LINUX_INSTALL_SOFTWARE)
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
include(CPack)
endif ()

if (APP_PACKAGE_FREEBSD)
message(STATUS "Configure PKG Package")
SET(CPACK_GENERATOR "FREEBSD")
set(CPACK_INSTALL_PREFIX "/usr/local/")
set(CPACK_FREEBSD_PACKAGE_NAME "gpgfrontend")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_PACKAGE_CONTACT "[email protected]")
SET(CPACK_FREEBSD_PACKAGE_MAINTAINER "Saturneric")

set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
include(CPack)
endif ()
endif ()

message(STATUS "Resource Files: ${RESOURCE_OUTPUT_DIRECTORY}")
Expand Down
4 changes: 2 additions & 2 deletions src/core/GpgConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

#include "GpgFrontendCore.h"

const int RESTART_CODE = 1000; ///<
const int RESTART_CODE = 1000; ///< only refresh ui
const int DEEP_RESTART_CODE = 1001; // refresh core and ui

namespace GpgFrontend {

using ByteArray = std::string; ///<
using ByteArrayPtr = std::unique_ptr<ByteArray>; ///<
using StdBypeArrayPtr = std::unique_ptr<ByteArray>; ///<
Expand Down
Loading

0 comments on commit 3cb623b

Please sign in to comment.