[git] GnuPG - branch, master, updated. gnupg-2.1.1-60-g3f67426

by Werner Koch cvs at cvs.gnupg.org
Tue Feb 3 09:14:23 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  3f67426a89bf4b37e1d2662fddc3eb4fa474c4ad (commit)
       via  8872657b2a52dd9698224b80e5672e23c5405eda (commit)
       via  616633b7713081ecc39419494879947cc7f163d0 (commit)
      from  7db6c82cec49b7c56c403a8ea98364086baf75f3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3f67426a89bf4b37e1d2662fddc3eb4fa474c4ad
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Feb 3 09:12:45 2015 +0100

    Update copyright years.
    
    * common/w32info-rc.h.in (W32INFO_COMPANYNAME): Change to "The GnuPG
    Project".

diff --git a/AUTHORS b/AUTHORS
index 58cfdb8..9f7377e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -15,8 +15,8 @@ copyrightable year that would otherwise be listed individually.
 List of Copyright holders
 =========================
 
-  Copyright (C) 1997-2014 Werner Koch
-  Copyright (C) 1994-2013 Free Software Foundation, Inc.
+  Copyright (C) 1997-2015 Werner Koch
+  Copyright (C) 1994-2015 Free Software Foundation, Inc.
   Copyright (C) 2003-2013 g10 Code GmbH
   Copyright (C) 2002 Klarälvdalens Datakonsult AB
   Copyright (C) 1995-1997, 2000-2007 Ulrich Drepper <drepper at gnu.ai.mit.edu>
diff --git a/README b/README
index fef57aa..886e87e 100644
--- a/README
+++ b/README
@@ -2,8 +2,8 @@
                       =========================
                              Version 2.1
 
-          Copyright 1997-2014 Werner Koch
-          Copyright 1998-2013 Free Software Foundation, Inc.
+          Copyright 1997-2015 Werner Koch
+          Copyright 1998-2015 Free Software Foundation, Inc.
 
 
 * INTRODUCTION
diff --git a/common/argparse.c b/common/argparse.c
index 169e234..b067314 100644
--- a/common/argparse.c
+++ b/common/argparse.c
@@ -1372,7 +1372,7 @@ strusage( int level )
       break;
     case 11: p = "foo"; break;
     case 13: p = "0.0"; break;
-    case 14: p = "Copyright (C) 2014 Free Software Foundation, Inc."; break;
+    case 14: p = "Copyright (C) 2015 Free Software Foundation, Inc."; break;
     case 15: p =
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n";
diff --git a/common/w32info-rc.h.in b/common/w32info-rc.h.in
index 1a427ee..d7909dd 100644
--- a/common/w32info-rc.h.in
+++ b/common/w32info-rc.h.in
@@ -17,7 +17,7 @@ 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 3 of the License, or (at your option) any later version.\0"
 
-#define W32INFO_COMPANYNAME "g10 Code GmbH\0"
+#define W32INFO_COMPANYNAME "The GnuPG Project\0"
 
 #define W32INFO_VI_FILEVERSION    @BUILD_FILEVERSION@
 #define W32INFO_VI_PRODUCTVERSION @BUILD_FILEVERSION@
@@ -29,4 +29,4 @@ built on @BUILD_HOSTNAME@ at @BUILD_TIMESTAMP@\0"
 #define W32INFO_PRODUCTVERSION "@VERSION@\0"
 
 #define W32INFO_LEGALCOPYRIGHT "Copyright \xa9 \
-2013 Free Software Foundation, Inc.\0"
+2015 Free Software Foundation, Inc.\0"
diff --git a/configure.ac b/configure.ac
index 30a639e..c61ecdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 # configure.ac - for GnuPG 2.1
 # Copyright (C) 1998-2012 Free Software Foundation, Inc.
-# Copyright (C) 1998-2014 Werner Koch
+# Copyright (C) 1998-2015 Werner Koch
 #
 # This file is part of GnuPG.
 #
diff --git a/doc/gnupg.texi b/doc/gnupg.texi
index 875b8e4..b095230 100644
--- a/doc/gnupg.texi
+++ b/doc/gnupg.texi
@@ -35,7 +35,7 @@ Published by The GnuPG Project@*
 @end iftex
 
 @copyright{} 2002, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.@*
- at copyright{} 2013, 2014 Werner Koch.
+ at copyright{} 2013, 2014, 2015 Werner Koch.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document

commit 8872657b2a52dd9698224b80e5672e23c5405eda
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Feb 1 15:35:57 2015 +0100

    w32: Change default Windows install dir and add bin to PATH.
    
    * build-aux/speedo.mk (WITH_GUI): New macro.  The Windows installer is
    now build by default without any GUI stuff.
    * build-aux/speedo/w32/inst.nsi: Change standard installation
    directory.
    (AddToPath, un.RemoveFromPath): New.
    (gnupginst): Add bin directory to the PATH.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk
index 005add7..8a2053a 100644
--- a/build-aux/speedo.mk
+++ b/build-aux/speedo.mk
@@ -84,22 +84,22 @@ this-native-gui: check-tools
 	$(SPEEDOMAKE) TARGETOS=native WHAT=this    WITH_GUI=1 all
 
 w32-installer: check-tools
-	$(SPEEDOMAKE) TARGETOS=w32    WHAT=release WITH_GUI=1 installer
+	$(SPEEDOMAKE) TARGETOS=w32    WHAT=release WITH_GUI=0 installer
 
 git-w32-installer: check-tools
-	$(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=1 installer
+	$(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=0 installer
 
 this-w32-installer: check-tools
-	$(SPEEDOMAKE) TARGETOS=w32    WHAT=this    WITH_GUI=1 installer
+	$(SPEEDOMAKE) TARGETOS=w32    WHAT=this    WITH_GUI=0 installer
 
 w32-source: check-tools
-	$(SPEEDOMAKE) TARGETOS=w32    WHAT=release WITH_GUI=1 dist-source
+	$(SPEEDOMAKE) TARGETOS=w32    WHAT=release WITH_GUI=0 dist-source
 
 git-w32-source: check-tools
-	$(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=1 dist-source
+	$(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=0 dist-source
 
 this-w32-source: check-tools
-	$(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=1 dist-source
+	$(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=0 dist-source
 
 
 # Set this to "git" to build from git,
@@ -160,43 +160,54 @@ speedo_spkgs  = \
 
 ifeq ($(TARGETOS),w32)
 speedo_spkgs += \
-	zlib bzip2 adns libiconv gettext
+	zlib bzip2 adns libiconv
+ifeq ($(WITH_GUI),1)
+speedo_spkgs += gettext
+endif
 endif
 
 speedo_spkgs += \
 	libassuan libksba gnupg
 
 ifeq ($(TARGETOS),w32)
+ifeq ($(WITH_GUI),1)
 speedo_spkgs += \
 	libffi glib pkg-config
 endif
+endif
 
 speedo_spkgs += \
 	gpgme
 
 ifeq ($(TARGETOS),w32)
+ifeq ($(WITH_GUI),1)
 speedo_spkgs += \
 	libpng \
 	gdk-pixbuf atk pixman cairo pango gtk+
 endif
+endif
 
 
 ifeq ($(WITH_GUI),1)
 speedo_spkgs += \
 	pinentry gpa
-endif
-
 ifeq ($(TARGETOS),w32)
 speedo_spkgs += \
 	gpgex
 endif
+endif
+
 
 # =====END LIST OF PACKAGES=====
 
 
-# Packages which are additionally build for 64 bit Windows
-speedo_w64_spkgs  = \
-	libgpg-error libiconv gettext libassuan gpgex
+# Packages which are additionally build for 64 bit Windows.  They are
+# only used for gpgex and thus we need to build them only if we want
+# a full installer.
+speedo_w64_spkgs  =
+ifeq ($(WITH_GUI),1)
+speedo_w64_spkgs += ibgpg-error libiconv gettext libassuan gpgex
+endif
 
 # Packages which use the gnupg autogen.sh build style
 speedo_gnupg_style = \
@@ -217,8 +228,10 @@ endif
 ifeq ($(UPD_SWDB),1)
 SWDB := $(shell $(topsrc)/build-aux/getswdb.sh $(getswdb_options) && echo okay)
 ifeq ($(strip $(SWDB)),)
+ifneq ($(WHAT),git)
 $(error Error getting GnuPG software version database)
 endif
+endif
 
 # Version numbers of the released packages
 gnupg_ver = $(shell cat $(topsrc)/VERSION)
@@ -328,7 +341,7 @@ else ifeq ($(WHAT),git)
   speedo_pkg_libassuan_git = $(gitrep)/libassuan
   speedo_pkg_libassuan_gitref = master
   speedo_pkg_libgcrypt_git = $(gitrep)/libgcrypt
-  speedo_pkg_libgcrypt_gitref = LIBGCRYPT-1-6-BRANCH
+  speedo_pkg_libgcrypt_gitref = master
   speedo_pkg_libksba_git = $(gitrep)/libksba
   speedo_pkg_libksba_gitref = master
   speedo_pkg_gpgme_git = $(gitrep)/gpgme
@@ -412,10 +425,17 @@ endef
 endif
 
 # The LDFLAGS is needed for -lintl for glib.
+ifeq ($(WITH_GUI),1)
 speedo_pkg_gpgme_configure = \
 	--enable-static --enable-w32-glib --disable-w32-qt \
 	--with-gpg-error-prefix=$(idir) \
 	LDFLAGS=-L$(idir)/lib
+else
+speedo_pkg_gpgme_configure = \
+	--disable-static --disable-w32-glib --disable-w32-qt \
+	--with-gpg-error-prefix=$(idir) \
+	LDFLAGS=-L$(idir)/lib
+endif
 
 speedo_pkg_pinentry_configure = \
 	--disable-pinentry-qt --disable-pinentry-qt4 --disable-pinentry-gtk \
@@ -1051,6 +1071,11 @@ w32_insthelpers: $(bdir)/g4wihelp.dll
 $(bdir)/inst-options.ini: $(w32src)/inst-options.ini
 	cat $(w32src)/inst-options.ini >$(bdir)/inst-options.ini
 
+extra_installer_options =
+ifeq ($(WITH_GUI),1)
+extra_installer_options += -DWITH_GUI=1
+endif
+
 installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt
 	$(MAKENSIS) -V2 \
                     -DINST_DIR=$(idir) \
@@ -1063,7 +1088,7 @@ installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt
 		    -DNAME=$(INST_NAME) \
 	            -DVERSION=$(INST_VERSION) \
 		    -DPROD_VERSION=$(INST_PROD_VERSION) \
-		    $(w32src)/inst.nsi
+		    $(extra_installer_options) $(w32src)/inst.nsi
 	@echo "Ready: $(idir)/$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).exe"
 
 endif
diff --git a/build-aux/speedo/w32/inst.nsi b/build-aux/speedo/w32/inst.nsi
index 8c64953..e88a91c 100644
--- a/build-aux/speedo/w32/inst.nsi
+++ b/build-aux/speedo/w32/inst.nsi
@@ -27,6 +27,8 @@
 #  NAME
 #  VERSION
 #  PROD_VERSION
+#
+#  WITH_GUI        - Include the GPA GUI
 
 !cd "${INST_DIR}"
 !addincludedir "${W32_SRCDIR}"
@@ -40,7 +42,7 @@
 !define PRETTY_PACKAGE "GNU Privacy Guard"
 !define PRETTY_PACKAGE_SHORT "GnuPG"
 !define COMPANY "The GnuPG Project"
-!define COPYRIGHT "Copyright (C) 2014 The GnuPG Project"
+!define COPYRIGHT "Copyright (C) 2015 The GnuPG Project"
 !define DESCRIPTION "GnuPG: The GNU Privacy Guard for Windows"
 
 !define INSTALL_DIR "GnuPG"
@@ -105,9 +107,9 @@ OutFile "${NAME}-${VERSION}_${BUILD_DATESTR}.exe"
 !ifndef INSTALL_DIR
 !define INSTALL_DIR "GnuPG"
 !endif
-InstallDir "$PROGRAMFILES\GNU\${INSTALL_DIR}"
+InstallDir "$PROGRAMFILES\${INSTALL_DIR}"
 
-InstallDirRegKey HKLM "Software\GNU\${PACKAGE_SHORT}" "Install Directory"
+InstallDirRegKey HKLM "Software\${PACKAGE_SHORT}" "Install Directory"
 
 
 # Add version information to the file properties.
@@ -138,7 +140,7 @@ VIAddVersionKey "FileVersion" "${PROD_VERSION}"
 
 # Remember the installer language
 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
-!define MUI_LANGDLL_REGISTRY_KEY "Software\GNU\GnuPG"
+!define MUI_LANGDLL_REGISTRY_KEY "Software\GnuPG"
 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
 
 #
@@ -168,7 +170,7 @@ Var STARTMENU_FOLDER
 !define MUI_PAGE_CUSTOMFUNCTION_PRE CheckIfStartMenuWanted
 !define MUI_STARTMENUPAGE_NODISABLE
 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GNU\GnuPG"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GnuPG"
 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
 # We need to set the Startmenu name explicitly because a slash in the
 # name is not possible.
@@ -498,6 +500,31 @@ Function TrimNewlines
    Exch $R0
 FunctionEnd
 
+
+# AddToPath - Adds the given dir to the search path.
+#        Input - head of the stack
+Function AddToPath
+  Exch $0
+  g4wihelp::path_add "$0"
+  StrCmp $R5 "0" add_to_path_done
+  SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
+  add_to_path_done:
+  Pop $0
+FunctionEnd
+
+
+# RemoveFromPath - Remove a given dir from the path
+#     Input: head of the stack
+Function un.RemoveFromPath
+  Exch $0
+  g4wihelp::path_remove "$0"
+  StrCmp $R5 "0" remove_from_path_done
+  SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
+  remove_from_path_done:
+  Pop $0
+FunctionEnd
+
+
 #
 # Define the installer sections.
 #
@@ -513,7 +540,7 @@ Section "-gnupginst"
   FileWrite $0 "${VERSION}$\r$\n"
   FileClose $0
 
-  WriteRegStr HKLM "Software\GNU\GnuPG" "Install Directory" $INSTDIR
+  WriteRegStr HKLM "Software\GnuPG" "Install Directory" $INSTDIR
 
   # If we are reinstalling, try to kill a possible running gpa using
   # an already installed gpa.
@@ -529,6 +556,11 @@ Section "-gnupginst"
     ExecWait '"$INSTDIR\bin\gpgconf" --kill gpg-agent'
 
   no_gpgconf:
+
+  # Add the bin directory to the PATH
+  Push "$INSTDIR\bin"
+  Call AddToPath
+  DetailPrint "Added $INSTDIR\bin to PATH"
 SectionEnd
 
 LangString DESC_Menu_gnupg_readme ${LANG_ENGLISH} \
@@ -558,19 +590,19 @@ Section "GnuPG" SEC_gnupg
 
   ClearErrors
   SetOverwrite try
-  File "libexec/scdaemon.exe"
+  File "bin/dirmngr.exe"
   SetOverwrite lastused
   ifErrors 0 +3
-      File /oname=scdaemon.exe.tmp "libexec/scdaemon.exe"
-      Rename /REBOOTOK scdaemon.exe.tmp scdaemon.exe
+      File /oname=dirmngr.exe.tmp "bin/dirmngr.exe"
+      Rename /REBOOTOK dirmngr.exe.tmp dirmngr.exe
 
   ClearErrors
   SetOverwrite try
-  File "bin/dirmngr.exe"
+  File "libexec/scdaemon.exe"
   SetOverwrite lastused
   ifErrors 0 +3
-      File /oname=dirmngr.exe.tmp "bin/dirmngr.exe"
-      Rename /REBOOTOK dirmngr.exe.tmp dirmngr.exe
+      File /oname=scdaemon.exe.tmp "libexec/scdaemon.exe"
+      Rename /REBOOTOK scdaemon.exe.tmp scdaemon.exe
 
   SetOutPath "$INSTDIR\share\gnupg"
   File "share/gnupg/gpg-conf.skel"
@@ -657,15 +689,16 @@ SectionEnd
 Section "-gpgme" SEC_gpgme
   SetOutPath "$INSTDIR\bin"
   File bin/libgpgme-11.dll
-  File bin/libgpgme-glib-11.dll
+  File /nonfatal bin/libgpgme-glib-11.dll
   File libexec/gpgme-w32spawn.exe
   SetOutPath "$INSTDIR\lib"
   File /oname=libgpgme.imp      lib/libgpgme.dll.a
-  File /oname=libgpgme-glib.imp lib/libgpgme-glib.dll.a
+  File /nonfatal /oname=libgpgme-glib.imp lib/libgpgme-glib.dll.a
   SetOutPath "$INSTDIR\include"
   File include/gpgme.h
 SectionEnd
 
+!ifdef WITH_GUI
 Section "-gettext" SEC_gettext
   SetOutPath "$INSTDIR\bin"
   File bin/libintl-8.dll
@@ -781,12 +814,16 @@ Section "-gtk+" SEC_gtk_
   SetOutPath "$INSTDIR\etc\gtk-2.0"
   File etc/gtk-2.0/im-multipress.conf
 SectionEnd
+!endif
 
+!ifdef WITH_GUI
 Section "-pinentry" SEC_pinentry
   SetOutPath "$INSTDIR\bin"
   File /oname=pinentry.exe "bin/pinentry-gtk-2.exe"
 SectionEnd
+!endif
 
+!ifdef WITH_GUI
 Section "gpa" SEC_gpa
   SectionIn RO
   SetOutPath "$INSTDIR\bin"
@@ -853,6 +890,8 @@ LangString T_GPGEX_RegFailed ${LANG_ENGLISH} \
 LangString DESC_SEC_gpgex ${LANG_ENGLISH} \
    "GnuPG Explorer Extension"
 
+!endif
+
 
 Section "-gnupglast" SEC_gnupglast
   SetOutPath "$INSTDIR"
@@ -885,19 +924,22 @@ ${If} ${RunningX64}
 ${EndIf}
 SectionEnd
 
-
+!ifdef WITH_GUI
 Section "-un.gpa"
   Delete "$INSTDIR\bin\gpa.exe"
   Delete "$INSTDIR\bin\launch-gpa.exe"
 
   RMDir "$INSTDIR\share\gpa"
 SectionEnd
+!endif
 
+!ifdef WITH_GUI
 Section "-un.pinentry"
   Delete "$INSTDIR\bin\pinentry.exe"
 SectionEnd
+!endif
 
-
+!ifdef WITH_GUI
 Section "-un.gtk+"
   Delete "$INSTDIR\bin\libgdk_pixbuf-2.0-0.dll"
   Delete "$INSTDIR\bin\libgdk-win32-2.0-0.dll"
@@ -1006,6 +1048,8 @@ Section "-un.glib"
   Delete "$INSTDIR\bin\gspawn-win32-helper-console.exe"
   Delete "$INSTDIR\bin\libffi-6.dll"
 SectionEnd
+!endif
+
 
 Section "-un.gettext"
   Delete "$INSTDIR\bin\libintl-8.dll"
@@ -1085,6 +1129,10 @@ Section "-un.gnupginst"
 
   Delete "$INSTDIR\VERSION"
 
+  # Remove the bin directory from the PATH
+  Push "$INSTDIR\bin"
+  Call un.RemoveFromPath
+
   # Try to remove the top level directories.
   RMDir "$INSTDIR\bin"
   RMDir "$INSTDIR\lib"
@@ -1149,6 +1197,7 @@ FunctionEnd
 
 # This also must be in a central place.  Also Urgs.
 
+!ifdef WITH_GUI
 Section "-startmenu"
 
 !ifdef HAVE_STARTMENU
@@ -1231,7 +1280,7 @@ no_quick_launch:
 
 !endif
 SectionEnd
-
+!endif
 
 
 #
@@ -1248,7 +1297,9 @@ Section
   WriteRegExpandStr HKLM $MYTMP "UninstallString" '"$INSTDIR\gnupg-uninstall.exe"'
   WriteRegExpandStr HKLM $MYTMP "InstallLocation" "$INSTDIR"
   WriteRegStr       HKLM $MYTMP "DisplayName"     "${PRETTY_PACKAGE}"
+!ifdef WITH_GUI
   WriteRegStr       HKLM $MYTMP "DisplayIcon"     "$INSTDIR\bin\gpa.exe,0"
+!endif
   WriteRegStr       HKLM $MYTMP "DisplayVersion"  "${VERSION}"
   WriteRegStr       HKLM $MYTMP "Publisher"       "The GnuPG Project"
   WriteRegStr       HKLM $MYTMP "URLInfoAbout"    "https://gnupg.org"
@@ -1259,6 +1310,7 @@ SectionEnd
 
 Section Uninstall
 
+!ifdef WITH_GUI
 !ifdef HAVE_STARTMENU
   # Make sure that the context of the automatic variables has been set to
   # the "all users" shell folder.  This guarantees that the menu gets written
@@ -1296,14 +1348,14 @@ Section Uninstall
 no_quick_launch_uninstall:
 
 !endif
-
+!endif
 
   Delete "$INSTDIR\gnupg-uninstall.exe"
   RMDir "$INSTDIR"
 
   # Clean the registry.
-  DeleteRegValue HKLM "Software\GNU\GnuPG" "Install Directory"
-  DeleteRegKey /ifempty HKLM "Software\GNU\GnuPG"
+  DeleteRegValue HKLM "Software\GnuPG" "Install Directory"
+  DeleteRegKey /ifempty HKLM "Software\GnuPG"
   # Remove Windows Add/Remove Programs support.
   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GnuPG"
 SectionEnd

commit 616633b7713081ecc39419494879947cc7f163d0
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Feb 1 15:27:32 2015 +0100

    w32: Allow for Unicocde installation directory.
    
    * common/homedir.c (w32_rootdir): Use Unicode fucntion not only for
    WinCE.
    --
    
    This uses the same code We used for WindowsCE.  It has not been tested
    with a Unicode requiring installation directory.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/homedir.c b/common/homedir.c
index 7939841..27141eb 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -74,7 +74,7 @@ static int w32_portable_app;
 
 #ifdef HAVE_W32_SYSTEM
 /* This flag is true if this process' binary has been installed under
-   bin and not in the root directory. */
+   bin and not in the root directory as often used before GnuPG 2.1. */
 static int w32_bin_is_bin;
 #endif /*HAVE_W32_SYSTEM*/
 
@@ -288,21 +288,15 @@ w32_rootdir (void)
     {
       char *p;
       int rc;
+      wchar_t wdir [MAX_PATH+5];
 
-#ifdef HAVE_W32CE_SYSTEM
-      {
-        wchar_t wdir [MAX_PATH+5];
-        rc = GetModuleFileName (NULL, wdir, MAX_PATH);
-        if (rc && WideCharToMultiByte (CP_UTF8, 0, wdir, -1, dir, MAX_PATH-4,
-                                       NULL, NULL) < 0)
-          rc = 0;
-      }
-#else
-      rc = GetModuleFileName (NULL, dir, MAX_PATH);
-#endif
+      rc = GetModuleFileNameW (NULL, wdir, MAX_PATH);
+      if (rc && WideCharToMultiByte (CP_UTF8, 0, wdir, -1, dir, MAX_PATH-4,
+                                     NULL, NULL) < 0)
+        rc = 0;
       if (!rc)
         {
-          log_debug ("GetModuleFileName failed: %s\n", w32_strerror (0));
+          log_debug ("GetModuleFileName failed: %s\n", w32_strerror (-1));
           *dir = 0;
         }
       got_dir = 1;

-----------------------------------------------------------------------

Summary of changes:
 AUTHORS                       |  4 +-
 README                        |  4 +-
 build-aux/speedo.mk           | 53 ++++++++++++++++++-------
 build-aux/speedo/w32/inst.nsi | 92 +++++++++++++++++++++++++++++++++----------
 common/argparse.c             |  2 +-
 common/homedir.c              | 20 ++++------
 common/w32info-rc.h.in        |  4 +-
 configure.ac                  |  2 +-
 doc/gnupg.texi                |  2 +-
 9 files changed, 127 insertions(+), 56 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list