Skip to content

Commit 795a81b

Browse files
committed
fix: according to issues and test, apply some fixes
2 parents 8e99ff1 + 52be475 commit 795a81b

27 files changed

+4806
-735
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,6 @@ jobs:
8383
sudo make install
8484
cd ${{github.workspace}}
8585
86-
- name: Build mimalloc (Linux)
87-
run: |
88-
git clone --depth 1 --branch v2.1.7 https://github.com/microsoft/mimalloc.git ${{github.workspace}}/third_party/mimalloc
89-
cd ${{github.workspace}}/third_party/mimalloc
90-
mkdir build && cd build
91-
cmake -G Ninja -DMI_SECURE=ON ..
92-
ninja
93-
sudo ninja install
94-
9586
- name: Build googletest (Linux)
9687
run: |
9788
git clone --depth 1 --branch v1.15.0 https://github.com/google/googletest.git ${{github.workspace}}/third_party/googletest

.github/workflows/release-qt5.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,6 @@ jobs:
138138
cd ${{github.workspace}}
139139
if: matrix.os == 'ubuntu-20.04'
140140

141-
- name: Build mimalloc (Linux)
142-
run: |
143-
git clone --depth 1 --branch v2.1.7 https://github.com/microsoft/mimalloc.git ${{github.workspace}}/third_party/mimalloc
144-
cd ${{github.workspace}}/third_party/mimalloc
145-
mkdir build && cd build
146-
cmake -G Ninja -DMI_SECURE=ON ..
147-
ninja
148-
sudo ninja install
149-
if: matrix.os == 'ubuntu-20.04'
150-
151-
- name: Build mimalloc (Windows)
152-
shell: msys2 {0}
153-
run: |
154-
git clone --depth 1 --branch v2.1.7 https://github.com/microsoft/mimalloc.git ${{github.workspace}}/third_party/mimalloc
155-
cd ${{github.workspace}}/third_party/mimalloc
156-
mkdir build && cd build
157-
cmake -G Ninja -DMI_SECURE=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. && ninja
158-
ninja install
159-
if: matrix.os == 'windows-2019'
160-
161141
- name: Build googletest (Linux)
162142
run: |
163143
git clone --depth 1 --branch v1.15.0 https://github.com/google/googletest.git ${{github.workspace}}/third_party/googletest

.github/workflows/release.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -164,26 +164,6 @@ jobs:
164164
make install
165165
if: matrix.os == 'windows-2019'
166166

167-
- name: Build mimalloc (Linux)
168-
run: |
169-
git clone --depth 1 --branch v2.1.7 https://github.com/microsoft/mimalloc.git ${{github.workspace}}/third_party/mimalloc
170-
cd ${{github.workspace}}/third_party/mimalloc
171-
mkdir build && cd build
172-
cmake -G Ninja -DMI_SECURE=ON ..
173-
ninja
174-
sudo ninja install
175-
if: matrix.os == 'ubuntu-20.04'
176-
177-
- name: Build mimalloc (Windows)
178-
shell: msys2 {0}
179-
run: |
180-
git clone --depth 1 --branch v2.1.7 https://github.com/microsoft/mimalloc.git ${{github.workspace}}/third_party/mimalloc
181-
cd ${{github.workspace}}/third_party/mimalloc
182-
mkdir build && cd build
183-
cmake -G Ninja -DMI_SECURE=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. && ninja
184-
ninja install
185-
if: matrix.os == 'windows-2019'
186-
187167
- name: Build googletest (Linux)
188168
run: |
189169
git clone --depth 1 --branch v1.15.0 https://github.com/google/googletest.git ${{github.workspace}}/third_party/googletest

gpgfrontend.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
<file alias="stairs.png">resource/lfs/icons/stairs.png</file>
9999
<file alias="detail.png">resource/lfs/icons/detail.png</file>
100100
<file alias="filter.png">resource/lfs/icons/filter.png</file>
101+
<file alias="setting.png">resource/lfs/icons/setting.png</file>
101102
</qresource>
102103
<qresource prefix="/test/key">
103104
<file alias="pv1.key">resource/lfs/test/data/pv1.key</file>

resource/lfs/icons/setting.png

5.16 KB
Loading

resource/lfs/locale/ts/GpgFrontend.de_DE.ts

Lines changed: 2366 additions & 302 deletions
Large diffs are not rendered by default.

resource/lfs/locale/ts/GpgFrontend.zh_CN.ts

Lines changed: 2365 additions & 301 deletions
Large diffs are not rendered by default.

src/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ endif()
5555

5656
find_package(OpenSSL REQUIRED)
5757

58-
# mimalloc
59-
if(NOT APPLE)
60-
find_package(mimalloc REQUIRED)
61-
endif()
62-
6358
# Set Build Information
6459
configure_file(${CMAKE_SOURCE_DIR}/src/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/src/GpgFrontend.h @ONLY)
6560
configure_file(${CMAKE_SOURCE_DIR}/src/GpgFrontendBuildInfo.h.in ${CMAKE_SOURCE_DIR}/src/GpgFrontendBuildInfo.h @ONLY)
@@ -283,14 +278,6 @@ if(BUILD_APPLICATION AND MINGW)
283278
file(GLOB _libDllPath "${MSYS64_BIN_PATH}/libgpgfrontend_*.dll")
284279
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
285280

286-
unset(_libDllPath)
287-
file(GLOB _libDllPath "${MSYS64_BIN_PATH}/libmimalloc*.dll")
288-
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
289-
290-
unset(_libDllPath)
291-
file(GLOB _libDllPath "${MSYS64_BIN_PATH}/mimalloc*.dll")
292-
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})
293-
294281
unset(_libDllPath)
295282
file(GLOB _libDllPath "${MSYS64_BIN_PATH}/libarchive*.dll")
296283
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libDllPath})

src/core/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ generate_export_header(gpgfrontend_core EXPORT_FILE_NAME "${_export_file}")
5050
# compile definitions
5151
target_compile_definitions(gpgfrontend_core PRIVATE GF_CORE_PRIVATE)
5252

53-
# mimalloc (except apple macos)
54-
if(NOT APPLE)
55-
target_link_libraries(gpgfrontend_core PUBLIC mimalloc)
56-
endif()
57-
5853
# qt-aes
5954
target_sources(gpgfrontend_core PRIVATE
6055
${CMAKE_SOURCE_DIR}/third_party/qt-aes/qaesencryption.cpp)

src/core/GpgCoreInit.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,6 @@ void InitGpgFrontendCore(CoreInitArgs args) {
304304
auto custom_key_database_path =
305305
settings.value("gnupg/custom_key_database_path", QString{}).toString();
306306

307-
auto custom_gnupg_install_path =
308-
settings.value("gnupg/custom_gnupg_install_path", QString{}).toString();
309-
310307
auto use_pinentry_as_password_input_dialog =
311308
settings
312309
.value("gnupg/use_pinentry_as_password_input_dialog",
@@ -327,10 +324,14 @@ void InitGpgFrontendCore(CoreInitArgs args) {
327324
!custom_key_database_path.isEmpty()) {
328325
if (VerifyKeyDatabasePath(QFileInfo(custom_key_database_path))) {
329326
key_database_fs_path =
330-
QFileInfo(custom_gnupg_install_path).absoluteFilePath();
327+
QFileInfo(custom_key_database_path).absoluteFilePath();
328+
LOG_D() << "use custom gpg key database: " << key_database_fs_path
329+
<< "raw:" << custom_key_database_path;
330+
331331
} else {
332332
LOG_W() << "custom gpg key database path is not suitable: "
333-
<< key_database_fs_path;
333+
<< key_database_fs_path
334+
<< "raw:" << custom_key_database_path;
334335
}
335336
} else {
336337

@@ -354,8 +355,7 @@ void InitGpgFrontendCore(CoreInitArgs args) {
354355

355356
// set custom gnupg path
356357
if (!gnupg_install_fs_path.isEmpty()) {
357-
args.custom_gpgconf = true;
358-
args.custom_gpgconf_path = gnupg_install_fs_path;
358+
args.gpgconf_path = gnupg_install_fs_path;
359359
}
360360

361361
args.offline_mode = forbid_all_gnupg_connection;

0 commit comments

Comments
 (0)