aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-05-07 21:25:24 +0000
committerSaturneric <[email protected]>2022-05-07 21:25:24 +0000
commit9a9f648824cbfc1b9075e1793504e541a700a721 (patch)
tree3e5c4c0182887436eb1990817146511995324b95
parentfix: link issue of intl in linux platform (diff)
downloadGpgFrontend-9a9f648824cbfc1b9075e1793504e541a700a721.tar.gz
GpgFrontend-9a9f648824cbfc1b9075e1793504e541a700a721.zip
fix: solve some issues
1. slove deb packing issues 2. solve ci issues
-rw-r--r--.github/workflows/debug.yml11
-rw-r--r--.github/workflows/release-deb-package.yml6
-rw-r--r--.github/workflows/release.yml11
-rw-r--r--src/CMakeLists.txt11
-rw-r--r--src/core/CMakeLists.txt12
-rw-r--r--src/main.cpp13
6 files changed, 17 insertions, 47 deletions
diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml
index 29598935..b8468ba7 100644
--- a/.github/workflows/debug.yml
+++ b/.github/workflows/debug.yml
@@ -42,7 +42,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 g++ ninja-build
- sudo apt-get -y install libarchive-dev libconfig++-dev libboost-all-dev
+ 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'
@@ -127,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: |
diff --git a/.github/workflows/release-deb-package.yml b/.github/workflows/release-deb-package.yml
index c0332d96..454a579f 100644
--- a/.github/workflows/release-deb-package.yml
+++ b/.github/workflows/release-deb-package.yml
@@ -40,7 +40,7 @@ jobs:
sudo apt-get update
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
+ 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'
@@ -57,7 +57,7 @@ jobs:
run: |
cd ${{github.workspace}}/third_party/libassuan
./autogen.sh
- ./configure --enable-maintainer-mode --enable-static=yes && make -j2
+ ./configure --enable-maintainer-mode && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'
@@ -66,7 +66,7 @@ jobs:
run: |
cd ${{github.workspace}}/third_party/gpgme
./autogen.sh
- ./configure --enable-maintainer-mode --enable-languages=cpp --enable-static=yes && make -j2
+ ./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index efa4c263..32577559 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -45,7 +45,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
+ 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
sudo apt-get -y install libglu1-mesa-dev libfontconfig1-dev libx11-xcb-dev libicu-dev libxcb-image0
@@ -133,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: |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 529b1a3c..dd8dff22 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -274,12 +274,21 @@ target_compile_features(${AppName} PUBLIC cxx_std_17)
# if building linux package
if (LINUX AND LINUX_INSTALL_SOFTWARE)
if (INSTALL_GPGFRONTEND_APP)
- install(TARGETS ${AppName}
+ install(TARGETS ${AppName} gpgfrontend_core gpgfrontend_ui
EXPORT GpgFrontendTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+ install(DIRECTORY /usr/local/lib/
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FILES_MATCHING PATTERN "libgpgme.so*")
+ install(DIRECTORY /usr/local/lib/
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FILES_MATCHING PATTERN "libassuan.so*")
+ install(DIRECTORY /usr/local/lib/
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FILES_MATCHING PATTERN "libgpg-error.so*")
install(FILES ${CMAKE_SOURCE_DIR}/TRANSLATORS
DESTINATION /usr/local/share/${AppName}/)
install(FILES ${CMAKE_SOURCE_DIR}/resource/meta/pub.gpgfrontend.gpgfrontend.appdata.xml
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index e87e32f3..dde81c0a 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -55,16 +55,8 @@ target_include_directories(gpgfrontend_core PUBLIC
target_sources(gpgfrontend_core PUBLIC
${CMAKE_SOURCE_DIR}/third_party/easyloggingpp/src/easylogging++.cc)
-if (LINUX AND GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE)
- # froce to link gnupg static libraries for deb
- find_library(GPG_ERROR_LIB libgpg-error.a)
- find_library(ASSUAN_LIB libassuan.a)
- find_library(GPGME_LIB libgpgme.a)
- target_link_libraries(gpgfrontend_core ${GPGME_LIB} ${ASSUAN_LIB} ${GPG_ERROR_LIB})
-else ()
- # link gnupg libraries
- target_link_libraries(gpgfrontend_core gpgme assuan gpg-error)
-endif ()
+# link gnupg libraries
+target_link_libraries(gpgfrontend_core gpgme assuan gpg-error)
# link openssl
target_link_libraries(gpgfrontend_core OpenSSL::SSL OpenSSL::Crypto)
# link Qt AES
diff --git a/src/main.cpp b/src/main.cpp
index 5badbf7c..51d977b2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -125,19 +125,6 @@ int main(int argc, char* argv[]) {
file.close();
#endif
-#ifdef GPG_STANDALONE_MODE
- LOG(INFO) << "GPG_STANDALONE_MODE Enabled";
- auto gpg_path =
- GpgFrontend::GlobalSettingStation::GetInstance().GetStandaloneGpgBinDir();
- auto db_path = GpgFrontend::GlobalSettingStation::GetInstance()
- .GetStandaloneDatabaseDir();
- GpgFrontend::GpgContext::CreateInstance(
- GpgFrontend::SingletonFunctionObject<
- GpgFrontend::GpgContext>::GetDefaultChannel(),
- std::make_unique<GpgFrontend::GpgContext>(true, db_path.u8string(), true,
- gpg_path.u8string()));
-#endif
-
// create the thread to load the gpg context
auto* init_ctx_thread = new GpgFrontend::CtxCheckThread();
QApplication::connect(init_ctx_thread, &QThread::finished, init_ctx_thread,