aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
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,