diff --git a/Makefile.am b/Makefile.am index 3bd77f0a..4e4e66ec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,93 +1,95 @@ # Makefile.am - Installer for GnuPG 4 Windows Makefile. # Copyright (C) 2005, 2008, 2012 g10 Code GmbH # # This file is part of GPG4Win. # # GPG4Win is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GPG4Win is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32 SUBDIRS = po packages doc src # find patches -type f | sort | sed 's/$/ \\/' | sed 's/^/ /' EXTRA_DIST = autogen.sh README.GIT ONEWS \ doc/license-page doc/GPLv3 \ build-aux/git-log-footer build-aux/git-log-fix \ patches/boost/boost-1-fixes.patch \ patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch \ patches/glib-2.41.5/01-socket.patch \ patches/glib-2.41.5/02-formatsec.patch \ patches/kconfigwidgets/0001-Make-QDbus-optional.patch \ patches/kiconthemes/0001-Make-DBus-optional.patch \ patches/kleopatra/0005-Hack-generated-conf-files-for-Crosscompiling.patch \ patches/kleopatra/0001-Use-gnupg-helper-code-from-libkleo.patch \ patches/kleopatra/0002-Use-aboutdata-from-libkleo-Gpg4win-on-Windows.patch \ patches/kxmlgui/0001-make-qdbus-optional.patch \ patches/kxmlgui/0004-Cruedly-disable-KSendbugmail.patch \ patches/libgpg-error-1.29/0001-doc-Fix-yat2m-build-for-cross-compilation.patch \ patches/qtbase/0001-Fix-build-without-std-thread.patch \ patches/qtbase/0002-Gpg4win-theme-names-and-relpaths.patch \ patches/qtbase/0001-Gpg4win-qstandardpaths-patch.patch \ patches/qttools/disable-most-tools.patch \ patches/w32pth-2.0.5/workaround-broken-libtool.patch \ patches/breeze-icons/0001-Make-binary-icons-cross-compilable.patch \ - patches/libkleo/0001-Add-some-more-Gpg4win-version-code-from-Kleopatra.patch + patches/libkleo/0001-Add-some-more-Gpg4win-version-code-from-Kleopatra.patch \ + patches/gpg4win-tools/0001-Show-about-data-information-from-VERSION.patch \ + patches/gpgol/0001-w64-Use-alternate-regview-instead-of-ifdefed-keys.patch copy-news: cp NEWS doc/website/NEWS.last copy-release: gpg4win-$(VERSION).tar.bz2 installers/gpg4win-$(VERSION).exe \ installers/gpg4win-light-$(VERSION).exe \ installers/gpg4win-vanilla-$(VERSION).exe @echo Copying $(VERSION) to $(RELEASEHOST) >&2 @set -e;\ if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \ test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\ then echo "This release has already been copied to the server" >&2 ;\ else scp gpg4win-$(VERSION).tar.bz2 \ installers/gpg4win-$(VERSION).exe \ installers/gpg4win-light-$(VERSION).exe \ installers/gpg4win-vanilla-$(VERSION).exe \ installers/gpg4win-src-$(VERSION).exe $(RELEASEHOST)/ ;\ for f in en de ; do \ scp src/README.$$f.txt \ $(RELEASEHOST)/README-$(VERSION).$$f.txt; \ done;\ fi dist-hook: gen-ChangeLog gen_start_date = 2012-03-26T00:00:00 .PHONY: gen-ChangeLog gen-ChangeLog: set -e; \ if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ $(GITLOG_TO_CHANGELOG) --append-dot --tear-off \ --amend=build-aux/git-log-fix \ --since=$(gen_start_date) ) > $(distdir)/cl-t; \ cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi download: packages/packages.current (cd packages; ./download.sh) msi: $(MAKE) $(AM_MAKEFLAGS) -C src msi diff --git a/patches/gpg4win-tools/0001-Show-about-data-information-from-VERSION.patch b/patches/gpg4win-tools/0001-Show-about-data-information-from-VERSION.patch new file mode 100755 index 00000000..4e94f93f --- /dev/null +++ b/patches/gpg4win-tools/0001-Show-about-data-information-from-VERSION.patch @@ -0,0 +1,92 @@ +#! /bin/sh +patch -p1 -l -f $* < $0 +exit $? + +From 942f653ce8e22d562496ce558e5af7ea71ede44c Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Thu, 6 Aug 2020 15:55:57 +0200 +Subject: [PATCH] Show about data information from VERSION + +This shows the same information as kleopatra +in the about dialog. + +GnuPG-Bug-Id: T5011 +--- + src/gpgolconfig/gpgoldebugpage.cpp | 44 ++++++++++++++++++++++++++++-- + 1 file changed, 42 insertions(+), 2 deletions(-) + +diff --git a/src/gpgolconfig/gpgoldebugpage.cpp b/src/gpgolconfig/gpgoldebugpage.cpp +index cfc90e4..cb9900e 100644 +--- a/src/gpgolconfig/gpgoldebugpage.cpp ++++ b/src/gpgolconfig/gpgoldebugpage.cpp +@@ -22,6 +22,8 @@ + #include + #include + #include ++#include ++#include + + /* See gpgol/src/debug.h */ + #define DBG_OOM (1<<1) +@@ -37,6 +39,22 @@ GpgOLDebugPage::GpgOLDebugPage(QWidget *parent): + load(); + } + ++class VersionLoader: public QThread ++{ ++ Q_OBJECT ++ void run() override { ++ const auto vers = Kleo::gpg4winVersion(); ++ const auto desc = Kleo::gpg4winDescription(); ++ const auto longDesc = Kleo::gpg4winLongDescription(); ++ emit resultReady(vers, desc, longDesc); ++ deleteLater(); ++ } ++signals: ++ void resultReady(const QString &vers, ++ const QString &desc, ++ const QString &ldesc); ++}; ++ + void GpgOLDebugPage::setupGUI() + { + auto baseLay = new QVBoxLayout(this); +@@ -115,12 +133,34 @@ void GpgOLDebugPage::setupGUI() + + baseLay->addWidget(othersGrp); + ++ auto aboutGroup = new QGroupBox(); ++ auto aboutLay = new QVBoxLayout(aboutGroup); ++ auto descLabel = new QLabel; ++ auto desc2Label = new QLabel; ++ descLabel->setOpenExternalLinks(true); ++ aboutLay->addWidget(descLabel); ++ aboutLay->addWidget(desc2Label); ++ aboutGroup->setVisible(false); ++ baseLay->addWidget(aboutGroup); ++ + auto bugReportLabel = new QLabel(QStringLiteral("%1").arg(_("How to report a problem?"))); + bugReportLabel->setOpenExternalLinks(true); +- + baseLay->addWidget(bugReportLabel); +- + baseLay->addStretch(1); ++ ++ auto loader = new VersionLoader; ++ connect(loader, &VersionLoader::resultReady, ++ this, [descLabel, desc2Label, aboutGroup] (const QString &version, const QString &desc, const QString &desc2) { ++ if (version.isEmpty()) { ++ return; ++ } ++ aboutGroup->setTitle(_("About GpgOL") + QLatin1Char(' ') + version); ++ qDebug() << "Verified version" << version; ++ descLabel->setText(desc); ++ desc2Label->setText(desc2); ++ aboutGroup->setVisible(true); ++ }); ++ loader->start(); + } + + static bool loadBool(const char *name, bool defaultVal) +-- +2.20.1 diff --git a/patches/gpgol/0001-w64-Use-alternate-regview-instead-of-ifdefed-keys.patch b/patches/gpgol/0001-w64-Use-alternate-regview-instead-of-ifdefed-keys.patch new file mode 100755 index 00000000..0524e8d1 --- /dev/null +++ b/patches/gpgol/0001-w64-Use-alternate-regview-instead-of-ifdefed-keys.patch @@ -0,0 +1,63 @@ +#! /bin/sh +patch -p1 -l -f $* < $0 +exit $? + +From a98e7f8d9e46845847f434115d800249f08627b8 Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Fri, 14 Aug 2020 12:30:41 +0200 +Subject: [PATCH] w64: Use alternate regview instead of ifdefed keys + +* src/common.cpp (_read_regStr): Use alterative view +for HKCU, too. +* src/common_indep.h (GPG4WIN_INSTDIR): Remove ifdefed names. + +-- +This fixes per user install of GpgOL and makes it easier +to avoid problems with different regviews if we always check +both. +--- + src/common.cpp | 5 ++++- + src/common_indep.h | 12 ++---------- + 2 files changed, 6 insertions(+), 11 deletions(-) + +diff --git a/src/common.cpp b/src/common.cpp +index a4e9c7d..2b7857d 100644 +--- a/src/common.cpp ++++ b/src/common.cpp +@@ -187,7 +187,10 @@ readRegStr (const char *root, const char *dir, const char *name) + return ret; + } + ret = _readRegStr (root_key, dir, name, false); +- ++ if (ret.empty()) { ++ // Try alternate as fallback ++ ret = _readRegStr (root_key, dir, name, true); ++ } + if (ret.empty()) { + // Try local machine as fallback. + ret = _readRegStr (HKEY_LOCAL_MACHINE, dir, name, false); +diff --git a/src/common_indep.h b/src/common_indep.h +index 4c43b10..aad03a8 100644 +--- a/src/common_indep.h ++++ b/src/common_indep.h +@@ -40,16 +40,8 @@ + #endif + + /* The Registry key used by Gpg4win. */ +-#ifdef _WIN64 +-# define GPG4WIN_REGKEY_2 "Software\\Wow6432Node\\GNU\\GnuPG" +-#else +-# define GPG4WIN_REGKEY_2 "Software\\GNU\\GnuPG" +-#endif +-#ifdef _WIN64 +-# define GPG4WIN_REGKEY_3 "Software\\Wow6432Node\\Gpg4win" +-#else +-# define GPG4WIN_REGKEY_3 "Software\\Gpg4win" +-#endif ++#define GPG4WIN_REGKEY_2 "Software\\GNU\\GnuPG" ++#define GPG4WIN_REGKEY_3 "Software\\Gpg4win" + /* Identifiers for the protocol. We use different one than those use + by gpgme. FIXME: We might want to define an unknown protocol to + non-null and define such a value also in gpgme. */ +-- +2.20.1