From 5a6089494b758ee03d9eb92b27b533e827797ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Wed, 5 Sep 2018 19:15:41 +0200 Subject: Add a special winstore config flag. Use it to make "missing GnuPG" message for Windows conditional. When set, remove references to GnuPG downloads to make Windows Store reviewers happy... In all cases, suggest installing Ubuntu from the Store as an alternative. --- qtpass.pri | 2 ++ src/configdialog.cpp | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/qtpass.pri b/qtpass.pri index 535a13c7..8959dd5d 100644 --- a/qtpass.pri +++ b/qtpass.pri @@ -63,6 +63,8 @@ isEmpty(QMAKE_LUPDATE) { } } +winstore: DEFINES += "WINSTORE=1" + win32 { RC_FILE = ../windows.rc static { diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 578f182d..db72fb08 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -565,11 +565,26 @@ void ConfigDialog::wizard() { if (!gpg.startsWith("wsl ") && !QFile(gpg).exists()) { criticalMessage( tr("GnuPG not found"), +#ifdef Q_OS_WIN +#ifdef WINSTORE + tr("Please install GnuPG on your system.
Install " + "Ubuntu from the Microsoft Store to get it.
" + "If you already did so, make sure you started it once and
" + "click \"Autodetect\" in the next dialog.") +#else + tr("Please install GnuPG on your system.
Install " + "Ubuntu from the Microsoft Store
or download it " + "from GnuPG.org") +#endif +#else tr("Please install GnuPG on your system.
Install " "gpg using your favorite package manager
or " "download it " - "from GnuPG.org")); + "from GnuPG.org") +#endif + ); clean = true; } -- cgit v1.2.3