Skip to content

Commit

Permalink
Merge pull request #54 from saturneric/develop-2.0.6
Browse files Browse the repository at this point in the history
Develop 2.0.6
  • Loading branch information
saturneric committed May 8, 2022
2 parents 6b7cc11 + 9ccdf62 commit f722eec
Show file tree
Hide file tree
Showing 100 changed files with 1,145 additions and 3,310 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,34 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -y install build-essential binutils git autoconf automake gettext texinfo
sudo apt-get -y install gcc g++ libconfig++-dev libboost-all-dev ninja-build
sudo apt-get -y install gcc g++ ninja-build
sudo apt-get -y install libarchive-dev libconfig++-dev libboost-all-dev
sudo apt-get -y install gpg
- name: Build gpg-error (Linux)
run: |
cd ${{github.workspace}}/third_party/libgpg-error
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
- name: Build assuan (Linux)
run: |
cd ${{github.workspace}}/third_party/libassuan
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
- name: Build GpgME (Linux)
run: |
cd ${{github.workspace}}/third_party/gpgme
./autogen.sh
./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
sudo make install
cd ${{github.workspace}}
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
Expand Down
43 changes: 31 additions & 12 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -y install build-essential binutils git autoconf automake gettext texinfo
sudo apt-get -y install gcc g++ libconfig++-dev libboost-all-dev ninja-build
sudo apt-get -y install gcc g++ ninja-build
sudo apt-get -y install libarchive-dev libconfig++-dev libboost-all-dev libssl-dev
sudo apt-get -y install gpg
if: matrix.os == 'ubuntu-latest'

Expand All @@ -61,13 +62,40 @@ jobs:

- name: Install Dependence (macOS)
run: |
brew install cmake git autoconf automake qt@5 texinfo gettext openssl@1.1
brew install boost ninja
brew install cmake autoconf automake qt@5 texinfo gettext openssl@1.1
brew install boost ninja libarchive libconfig gpgme
brew unlink gettext && brew link --force gettext
brew link qt@5
brew link openssl@1.1 --force
if: matrix.os == 'macos-10.15'

- name: Build gpg-error (Linux)
run: |
cd ${{github.workspace}}/third_party/libgpg-error
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-latest'

- name: Build assuan (Linux)
run: |
cd ${{github.workspace}}/third_party/libassuan
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-latest'

- name: Build GpgME (Linux)
run: |
cd ${{github.workspace}}/third_party/gpgme
./autogen.sh
./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-latest'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
Expand Down Expand Up @@ -99,15 +127,6 @@ jobs:
pacman --noconfirm -S --needed mingw-w64-x86_64-libarchive
if: matrix.os == 'windows-latest'

- name: Build GpgME (Windows)
shell: msys2 {0}
run: |
cd $(echo "/${{github.workspace}}/third_party/gpgme" | sed 's/\\/\//g' | sed 's/://')
./autogen.sh
./configure --enable-maintainer-mode --enable-static=yes --disable-gpg-test --enable-languages=cpp LDFLAGS="-static" && make -j2
make install
if: matrix.os == 'windows-latest'

- name: Build GpgFrontend (Linux)
# Build your GpgFrontend with the given configuration
run: |
Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/release-deb-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,39 @@ jobs:
- name: Install Dependence (Ubuntu 20.04)
run: |
sudo apt-get update
sudo apt-get -y install build-essential binutils git autoconf automake gettext texinfo qt5-default ninja-build
sudo apt-get -y install gcc g++ libconfig++-dev libboost-all-dev
sudo apt-get -y install build-essential binutils git autoconf automake gettext texinfo qt5-default
sudo apt-get -y install gcc g++ ninja-build
sudo apt-get -y install libarchive-dev libconfig++-dev libboost-all-dev libssl-dev
sudo apt-get -y install gpg
if: matrix.os == 'ubuntu-20.04'

- name: Build gpg-error (Linux)
run: |
cd ${{github.workspace}}/third_party/libgpg-error
./autogen.sh
./configure --enable-maintainer-mode --enable-static=yes && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'

- name: Build assuan (Linux)
run: |
cd ${{github.workspace}}/third_party/libassuan
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'

- name: Build GpgME (Linux)
run: |
cd ${{github.workspace}}/third_party/gpgme
./autogen.sh
./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'

- name: Build & Package GpgFrontend (Linux DEB Package)
# Build your program with the given configuration
run: |
Expand Down
45 changes: 32 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ jobs:
run: |
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 libconfig++-dev libboost-all-dev
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 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 ninja-build
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
sudo apt-get -y install libglu1-mesa-dev libfontconfig1-dev libx11-xcb-dev libicu-dev libxcb-*
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
Expand All @@ -68,13 +69,40 @@ jobs:

- name: Install Dependence (macOS)
run: |
brew install cmake git autoconf automake qt@5 texinfo gettext openssl@1.1
brew install boost ninja
brew install cmake autoconf automake qt@5 texinfo gettext openssl@1.1
brew install boost ninja libarchive libconfig gpgme
brew unlink gettext && brew link --force gettext
brew link qt@5
brew link openssl@1.1 --force
if: matrix.os == 'macos-10.15'

- name: Build gpg-error (Linux)
run: |
cd ${{github.workspace}}/third_party/libgpg-error
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-18.04'

- name: Build assuan (Linux)
run: |
cd ${{github.workspace}}/third_party/libassuan
./autogen.sh
./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-18.04'

- name: Build GpgME (Linux)
run: |
cd ${{github.workspace}}/third_party/gpgme
./autogen.sh
./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-18.04'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
Expand Down Expand Up @@ -105,15 +133,6 @@ jobs:
pacman --noconfirm -S --needed mingw-w64-x86_64-ninja mingw-w64-x86_64-gnupg mingw-w64-x86_64-libarchive
if: matrix.os == 'windows-2019'

- name: Build GpgME (Windows)
shell: msys2 {0}
run: |
cd $(echo "/${{github.workspace}}/third_party/gpgme" | sed 's/\\/\//g' | sed 's/://')
./autogen.sh
./configure --enable-maintainer-mode --enable-static=yes --disable-gpg-test --enable-languages=cpp LDFLAGS="-static" && make -j2
make install
if: matrix.os == 'windows-2019'

- name: Build GpgFrontend (Linux)
# Build your GpgFrontend with the given configuration
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
src/GpgFrontend.h
src/GpgFrontendBuildInfo.h
src/GpgFrontendBuildInstallInfo.h
src/core/GpgFrontendCoreExport.h
docs/

# gettext
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "third_party/libgpg-error"]
path = third_party/libgpg-error
url = https://github.com/saturneric/libgpg-error
[submodule "third_party/vmime"]
path = third_party/vmime
url = https://github.com/saturneric/vmime.git
[submodule "third_party/json"]
path = third_party/json
url = https://github.com/saturneric/json
Expand All @@ -19,9 +16,6 @@
[submodule "third_party/qt-aes"]
path = third_party/qt-aes
url = https://github.com/saturneric/Qt-AES
[submodule "third_party/smtp-mime"]
path = third_party/smtp-mime
url = https://github.com/saturneric/SmtpClient-for-Qt.git
[submodule "third_party/libarchive"]
path = third_party/libarchive
url = https://github.com/saturneric/libarchive.git
Expand Down
13 changes: 9 additions & 4 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.5 LANGUAGES CXX)
project(GpgFrontend VERSION 2.0.6 LANGUAGES CXX)

# show cmake version
message(STATUS "GpgFrontend Build Configuration Started CMAKE Version ${CMAKE_VERSION}")
Expand Down Expand Up @@ -213,7 +213,7 @@ message(STATUS "Define CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
set(BUILD_FLAG 0)
ADD_DEFINITIONS(-DRELEASE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
# Release Version force to build using option STABLE_APPLICATION_BUILD
set(FULL_APPLICATION_BUILD 0)
set(STABLE_APPLICATION_BUILD 1)
Expand Down Expand Up @@ -265,6 +265,9 @@ message(STATUS "GpgFrontend Build Timestamp ${BUILD_TIMESTAMP}")
message(STATUS "GpgFrontend Build Version ${BUILD_VERSION}")
message(STATUS "GpgFrontend Git Repo Version ${GIT_VERSION}")

# support for dymatic libraries
include (GenerateExportHeader)

# Windows
IF (MINGW)
message(STATUS "GpgFrontend Configuration For OS Platform Microsoft Windows")
Expand All @@ -273,8 +276,10 @@ IF (MINGW)
set(OS_PLATFORM 0)
add_definitions(-DWINDOWS)

set(Boost_USE_STATIC_LIBS ON)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/third_party
Expand Down
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ $ ./release/GpgFrontend.exe
Install and compile dependencies.

```shell
$ brew install cmake git autoconf automake qt@5 texinfo gettext openssl@1.1
$ brew install cmake git autoconf automake qt@5 texinfo gettext openssl@1.1 libarchive
$ brew install boost ninja
$ brew unlink gettext && brew link --force gettext
$ brew link qt@5
Expand Down Expand Up @@ -152,13 +152,36 @@ Install and compile dependencies.

```shell
$ sudo apt-get update
$ sudo apt-get -y install gettext texinfo git ninja-build cmake
$ sudo apt-get -y install gcc g++ build-essential binutils autoconf automake
$ sudo apt-get -y libboost-all-dev qt5-default
$ 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 gpg # If you need to run directly after building.
```

Build the code and make the deb package.
Compile and install libgpg-error/libassuan/gpgme. Notice: These in third_party directory is newer than those in apt.

```shell
# libgpg-error
$ cd GpgFrontend
$ cd ./third_party/libgpg-error
$ ./autogen.sh
$ ./configure --enable-maintainer-mode && make
$ sudo make install
# libassuan
$ cd GpgFrontend
$ cd ./third_party/libassuan
$ ./autogen.sh
$ ./configure --enable-maintainer-mode && make
$ sudo make install
# gpgme
$ cd GpgFrontend
$ cd ./third_party/gpgme
$ ./autogen.sh
$ ./configure --enable-maintainer-mode --enable-languages=cpp && make
$ sudo make install
```

Build the code and make the deb package(Please use Ubuntu 20.04 or later).

```shell
$ cd GpgFrontend
Expand All @@ -168,7 +191,7 @@ $ ninja
$ ninja package
```

Build the code separately for debug.
Build the code separately for debug(Please use ubuntu 18.04 or later).

```shell
$ cd GpgFrontend
Expand All @@ -178,7 +201,7 @@ $ ninja
$ ./release/GpgFrontend # run the program
```

Package the AppImage.
Package the AppImage(Should use ubuntu 18.04).

```shell
$ cd GpgFrontend
Expand Down
3 changes: 2 additions & 1 deletion TRANSLATORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Translators:
Fabian Hêche <fabian.heche@gmail.com> (fr_FR)
Google Translation Machine

Reviewers:
Saturneric(zh_CN)
Saturneric <eric@bktus.com> (zh_CN)

0 comments on commit f722eec

Please sign in to comment.