aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-02-01 12:21:31 +0000
committerGitHub <[email protected]>2024-02-01 12:21:31 +0000
commitd5e6fdb044d42020c892e6a8cd6364567cb5451e (patch)
tree4384fe2f5357d44e65319b294180c87e0769cfb5
parentMerge pull request #128 from saturneric/dev/2.1.1/main (diff)
parentfix: slove ci issues (diff)
downloadGpgFrontend-d5e6fdb044d42020c892e6a8cd6364567cb5451e.tar.gz
GpgFrontend-d5e6fdb044d42020c892e6a8cd6364567cb5451e.zip
Merge pull request #129 from saturneric/dev/2.1.1/main
Develop 2.1.2.4
-rw-r--r--.github/workflows/codeql-analysis.yml6
-rw-r--r--.github/workflows/release-qt5.yml37
-rw-r--r--.github/workflows/release.yml65
-rw-r--r--src/CMakeLists.txt19
-rw-r--r--src/core/CMakeLists.txt8
-rw-r--r--src/core/function/GlobalSettingStation.cpp22
-rw-r--r--src/ui/dialog/WaitingDialog.cpp1
7 files changed, 131 insertions, 27 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index d0e9c778..ad6e41db 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -72,7 +72,7 @@ jobs:
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
./autogen.sh
- ./configure --enable-maintainer-mode && make -j2
+ ./configure --enable-maintainer-mode && make -j4
sudo make install
cd ${{github.workspace}}
@@ -81,7 +81,7 @@ jobs:
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
./autogen.sh
- ./configure --enable-maintainer-mode && make -j2
+ ./configure --enable-maintainer-mode && make -j4
sudo make install
cd ${{github.workspace}}
@@ -90,7 +90,7 @@ jobs:
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
./autogen.sh
- ./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
+ ./configure --enable-maintainer-mode --enable-languages=cpp && make -j4
sudo make install
cd ${{github.workspace}}
diff --git a/.github/workflows/release-qt5.yml b/.github/workflows/release-qt5.yml
index 2a9336a1..74ffc61e 100644
--- a/.github/workflows/release-qt5.yml
+++ b/.github/workflows/release-qt5.yml
@@ -54,10 +54,43 @@ jobs:
run: |
pacman --noconfirm -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake autoconf
pacman --noconfirm -S --needed make texinfo automake
- pacman --noconfirm -S --needed mingw-w64-x86_64-qt5 libintl msys2-runtime-devel gettext-devel mingw-w64-x86_64-gpgme
+ pacman --noconfirm -S --needed mingw-w64-x86_64-qt5 libintl msys2-runtime-devel gettext-devel
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 gpg-error (Windows)
+ shell: msys2 {0}
+ 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
+ ./autogen.sh
+ ./configure --enable-maintainer-mode && make -j4
+ make install
+ cd ${{github.workspace}}
+ if: matrix.os == 'windows-2019'
+
+ - name: Build assuan (Windows)
+ shell: msys2 {0}
+ 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
+ ./autogen.sh
+ ./configure --enable-maintainer-mode && make -j4
+ make install
+ cd ${{github.workspace}}
+ if: matrix.os == 'windows-2019'
+
+ - name: Build GpgME (Windows)
+ shell: msys2 {0}
+ run: |
+ git clone --depth 1 --branch gpgme-1.18.0 git://git.gnupg.org/gpgme.git ${{github.workspace}}/third_party/gpgme
+ cd ${{github.workspace}}/third_party/gpgme
+ ./autogen.sh
+ ./configure --enable-maintainer-mode --enable-languages=cpp --disable-gpg-test && make -j4
+ make install
+ cd ${{github.workspace}}
+ if: matrix.os == 'windows-2019'
+
- name: Configure CMake & Build Binary(Windows)
shell: msys2 {0}
run: |
@@ -65,7 +98,7 @@ jobs:
mkdir build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_STABLE=ON -DGPGFRONTEND_QT5_BUILD=ON ..
# Build your program with the given configuration
- cmake --build . --config ${{env.BUILD_TYPE}} -- -j 2
+ cmake --build . --config ${{env.BUILD_TYPE}} -- -j 4
if: matrix.os == 'windows-2019'
- name: Upload Artifact(Windows)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2f20de6c..0d3d52df 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -89,50 +89,83 @@ jobs:
brew link openssl@3 --force
if: matrix.os == 'macos-11' || matrix.os == 'macos-12'
+ - name: Set up MinGW (Windows)
+ uses: msys2/setup-msys2@v2
+ with:
+ install: git msys2-devel base-devel binutils mingw-w64-x86_64-toolchain
+ release: false
+ if: matrix.os == 'windows-2019'
+
+ - name: Set up Dependence (Windows)
+ shell: msys2 {0}
+ run: |
+ pacman --noconfirm -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake autoconf
+ pacman --noconfirm -S --needed make texinfo automake
+ pacman --noconfirm -S --needed mingw-w64-x86_64-qt6 libintl msys2-runtime-devel gettext-devel
+ 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 gpg-error (Linux)
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
./autogen.sh
- ./configure --enable-maintainer-mode && make -j2
+ ./configure --enable-maintainer-mode && make -j4
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'
+ - name: Build gpg-error (Windows)
+ shell: msys2 {0}
+ 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
+ ./autogen.sh
+ ./configure --enable-maintainer-mode && make -j4
+ make install
+ cd ${{github.workspace}}
+ if: matrix.os == 'windows-2019'
+
- name: Build assuan (Linux)
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
./autogen.sh
- ./configure --enable-maintainer-mode && make -j2
+ ./configure --enable-maintainer-mode && make -j4
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'
+ - name: Build assuan (Windows)
+ shell: msys2 {0}
+ 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
+ ./autogen.sh
+ ./configure --enable-maintainer-mode && make -j4
+ make install
+ cd ${{github.workspace}}
+ if: matrix.os == 'windows-2019'
+
- name: Build GpgME (Linux)
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
./autogen.sh
- ./configure --enable-maintainer-mode --enable-languages=cpp && make -j2
+ ./configure --enable-maintainer-mode --enable-languages=cpp && make -j4
sudo make install
cd ${{github.workspace}}
if: matrix.os == 'ubuntu-20.04'
- - name: Set up MinGW (Windows)
- uses: msys2/setup-msys2@v2
- with:
- install: git msys2-devel base-devel binutils mingw-w64-x86_64-toolchain
- release: false
- if: matrix.os == 'windows-2019'
-
- - name: Set up Dependence (Windows)
+ - name: Build GpgME (Windows)
shell: msys2 {0}
run: |
- pacman --noconfirm -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake autoconf
- pacman --noconfirm -S --needed make texinfo automake
- pacman --noconfirm -S --needed mingw-w64-x86_64-qt6 libintl msys2-runtime-devel gettext-devel mingw-w64-x86_64-gpgme
- pacman --noconfirm -S --needed mingw-w64-x86_64-ninja mingw-w64-x86_64-gnupg mingw-w64-x86_64-libarchive
+ git clone --depth 1 --branch gpgme-1.18.0 git://git.gnupg.org/gpgme.git ${{github.workspace}}/third_party/gpgme
+ cd ${{github.workspace}}/third_party/gpgme
+ ./autogen.sh
+ ./configure --enable-maintainer-mode --enable-languages=cpp --disable-gpg-test && make -j4
+ make install
+ cd ${{github.workspace}}
if: matrix.os == 'windows-2019'
- name: Build GpgFrontend (Linux)
@@ -202,7 +235,7 @@ jobs:
mkdir build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_STABLE=ON ..
# Build your program with the given configuration
- cmake --build . --config ${{env.BUILD_TYPE}} -- -j 2
+ cmake --build . --config ${{env.BUILD_TYPE}} -- -j 4
if: matrix.os == 'windows-2019'
- name: Upload Artifact(Linux)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e47e2bae..8fa51056 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -179,7 +179,7 @@ if (BUILD_APPLICATION)
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
unset(_libDllPath)
- file(GLOB _libDllPath "${_libDllBinPath}/libassuan-*.dll")
+ file(GLOB _libDllPath "${_libDllBinPath}/libassuan*.dll")
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
unset(_libDllPath)
@@ -207,11 +207,11 @@ if (BUILD_APPLICATION)
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
unset(_libDllPath)
- file(GLOB _libDllPath "${_libDllBinPath}/libgpg-error-*.dll")
+ file(GLOB _libDllPath "${_libDllBinPath}/libgpg-error*.dll")
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
unset(_libDllPath)
- file(GLOB _libDllPath "${_libDllBinPath}/libgpgme-*.dll")
+ file(GLOB _libDllPath "${_libDllBinPath}/libgpgme*.dll")
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
unset(_libDllPath)
@@ -279,9 +279,20 @@ if (BUILD_APPLICATION)
file(GLOB _libDllPath "${_libDllBinPath}/libxml2-*.dll")
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
+ # /mingw64/libexec
+ execute_process(
+ COMMAND cygpath -m /mingw64/libexec
+ OUTPUT_VARIABLE MSYS64_LIBEXEC_PATH
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
# gpgme-w32spawn.exe
unset(_libExEPath)
- file(GLOB _libExEPath "${_libDllBinPath}/gpgme-w32spawn.exe")
+ file(GLOB _libExEPath "${MSYS64_LIBEXEC_PATH}/gpgme-*.exe")
+ list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libExEPath})
+
+ unset(_libExEPath)
+ file(GLOB _libExEPath "${_libDllBinPath}/gpgme-*.exe")
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libExEPath})
set(ALL_RUNTIME_DLL_FILES "")
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b5dd3571..cc1f6742 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -74,7 +74,13 @@ endif ()
# spdlog
target_link_libraries(gpgfrontend_core PRIVATE spdlog)
-
+if(MINGW)
+ set_target_properties(spdlog
+ PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
+ )
+endif()
# configure libarchive
if(NOT MINGW)
diff --git a/src/core/function/GlobalSettingStation.cpp b/src/core/function/GlobalSettingStation.cpp
index 594b6661..7b21ebca 100644
--- a/src/core/function/GlobalSettingStation.cpp
+++ b/src/core/function/GlobalSettingStation.cpp
@@ -59,12 +59,26 @@ class GlobalSettingStation::Impl {
GF_CORE_LOG_INFO("app data path: {}", app_data_path_);
GF_CORE_LOG_INFO("app log path: {}", app_log_path_);
+#ifdef WINDOWS
+ GF_CORE_LOG_INFO("app config path: {}", app_config_path_);
+#endif
+
+#ifdef WINDOWS
+ if (!QDir(app_config_path_).exists()) QDir(app_config_path_).mkpath(".");
+#endif
+
if (!QDir(app_data_path_).exists()) QDir(app_data_path_).mkpath(".");
if (!QDir(app_log_path_).exists()) QDir(app_log_path_).mkpath(".");
}
[[nodiscard]] auto GetSettings() -> QSettings {
- if (!portable_mode_) return QSettings();
+ if (!portable_mode_) {
+#ifdef WINDOWS
+ return QSettings(app_config_target_path_, QSettings::IniFormat);
+#else
+ return QSettings();
+#endif
+ }
return {app_portable_config_path_, QSettings::IniFormat};
}
@@ -116,11 +130,17 @@ class GlobalSettingStation::Impl {
QString app_data_path_ = QString{QStandardPaths::writableLocation(
QStandardPaths::AppLocalDataLocation)}; ///< Program Data Location
+ QString app_config_path_ = QString{
+ QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)};
+
QString app_log_path_ = app_data_path_ + "/logs"; ///< Program Data Location
QString app_data_objs_path_ =
app_data_path_ + "/data_objs"; ///< Object storage path
+ QString app_config_target_path_ =
+ app_config_path_ + "/config.ini"; ///< take effect only in portable mode
+
bool portable_mode_ = false; ///<
QString app_portable_config_path_ =
working_path_ + "/config.ini"; ///< take effect only in portable mode
diff --git a/src/ui/dialog/WaitingDialog.cpp b/src/ui/dialog/WaitingDialog.cpp
index 4b1a908f..87ac0fe5 100644
--- a/src/ui/dialog/WaitingDialog.cpp
+++ b/src/ui/dialog/WaitingDialog.cpp
@@ -48,6 +48,7 @@ WaitingDialog::WaitingDialog(const QString& title, QWidget* parent)
Qt::CustomizeWindowHint);
this->setWindowTitle(title);
this->setAttribute(Qt::WA_DeleteOnClose);
+ this->setFixedSize(240, 42);
this->movePosition2CenterOfParent();
this->show();