diff options
author | Saturneric <[email protected]> | 2021-12-20 13:52:05 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-20 13:52:05 +0000 |
commit | e35ba01111cf700b5369ed93f56539e89531a138 (patch) | |
tree | 78f473e856cd07fa3fccfc143344d2bc173d5214 /src/main.cpp | |
parent | Update Test Code & Added Standlone Support (diff) | |
download | GpgFrontend-e35ba01111cf700b5369ed93f56539e89531a138.tar.gz GpgFrontend-e35ba01111cf700b5369ed93f56539e89531a138.zip |
Continue to add Standalone Support.
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index ed863f41..ae04d7db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,7 @@ #include "GpgFrontendBuildInfo.h" #include "gpg/GpgContext.h" +#include "gpg/GpgFunctionObject.h" #include "ui/MainWindow.h" #include "ui/function/CtxCheckThread.h" #include "ui/settings/GlobalSettingStation.h" @@ -88,6 +89,19 @@ int main(int argc, char* argv[]) { file.close(); #endif +#ifdef GPG_STANDALONE_MODE + LOG(INFO) << "GPG_STANDALONE_MODE Enabled"; + auto gpg_path = GpgFrontend::UI::GlobalSettingStation::GetInstance() + .GetStandaloneGpgBinDir(); + auto db_path = GpgFrontend::UI::GlobalSettingStation::GetInstance() + .GetStandaloneDatabaseDir(); + GpgFrontend::GpgContext::CreateInstance( + GpgFrontend::SingletonFunctionObject< + GpgFrontend::GpgContext>::GetDefaultChannel(), + std::make_unique<GpgFrontend::GpgContext>(true, db_path.string(), true, + gpg_path.string())); +#endif + auto* init_ctx_thread = new GpgFrontend::UI::CtxCheckThread(); QApplication::connect(init_ctx_thread, &QThread::finished, init_ctx_thread, |