[Gpg4win-commits] [git] Gpg4win - branch, kleo-kf5, updated. gpg4win-2.3.0-38-g332a134

by Andre Heinecke cvs at cvs.gnupg.org
Fri Jan 8 14:53:13 CET 2016


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 "GnuPG for Windows".

The branch, kleo-kf5 has been updated
       via  332a134227542d3ab7c082149a271cd5310247a4 (commit)
       via  b1a6967efb43d6d0ce5508bab6ac8a71b1a72ba8 (commit)
      from  0063960cc2d59044dcc79af4de94be596c0bfbc2 (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 332a134227542d3ab7c082149a271cd5310247a4
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 8 14:50:42 2016 +0100

    Remove Kleowrap and Gpgwrap
    
    * src/gpgwrap.c, src/kleowrap.c: Begone.
    * src/Makefile.am: Remove gpgwrap / kleowrap stuff.

diff --git a/src/Makefile.am b/src/Makefile.am
index 2d247c5..f7bcd87 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,11 +20,11 @@
 EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \
 	config.site config.nsi.in \
         installer-options.ini.in libiconv.def libintl.def loreley.mid \
-        gpg4win-splash.wav gpgwrap.c exdll.h g4wihelp.c g4wihelp.nsi \
+        gpg4win-splash.wav exdll.h g4wihelp.c g4wihelp.nsi \
         inst-sections.nsi installer.nsi installer-finish.nsi  \
 	zlib.pc sha1sum.c mkportable.c     \
 	mkportable-vanilla.h mkportable-light.h mkportable-full.h \
-        kleowrap.c potomo Memento.nsh \
+        potomo Memento.nsh \
         inst-gpg4win.nsi	   uninst-gpg4win.nsi	      \
         inst-atk.nsi               uninst-atk.nsi	      \
         inst-expat.nsi		   uninst-expat.nsi	      \
@@ -80,7 +80,7 @@ foosum_exe = sha1sum.exe md5sum.exe sha256sum.exe mkportable.exe
 CLEANFILES = g4wihelp.dll versioninfo.txt $(README_files) $(HOWTO_files) \
              installer-options.ini NEWS.tmp COMPONENTS-list.tmp \
 	     license.blurb cdversioninfo.tmp \
-	     gpgwrap.exe gpgwrap-2.exe kleowrap.exe $(foosum_exe)
+	     $(foosum_exe)
 
 # Supported source packages.
 gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
@@ -466,7 +466,7 @@ installer-options.ini : $(top_srcdir)/src/installer-options.ini.in
 # if makensis changed to the directory of the source file at startup.
 # So we have to pull a couple of strings to correct this.
 gpg4win-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-                        g4wihelp.dll gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
+                        g4wihelp.dll \
 		        $(foosum_exe) \
 			$(README_files) $(HOWTO_files) \
 	                license.blurb installer-options.ini versioninfo.txt
@@ -474,7 +474,7 @@ gpg4win-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
            -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/gpg4win.nsi
 
 gpg4win-light-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-                        g4wihelp.dll gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
+                        g4wihelp.dll \
 		        $(foosum_exe) \
 			$(README_files) $(HOWTO_files) \
 			license.blurb installer-options.ini versioninfo.txt
@@ -483,7 +483,7 @@ gpg4win-light-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
            -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi
 
 gpg4win-vanilla-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-                        g4wihelp.dll gpgwrap.exe gpgwrap-2.exe \
+                        g4wihelp.dll  \
 		        $(foosum_exe) \
 			$(README_files) $(HOWTO_files) \
 		        license.blurb installer-options.ini versioninfo.txt
@@ -492,7 +492,6 @@ gpg4win-vanilla-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
            -DGPG4WIN_VANILLA=1 $(srcdir)/gpg4win.nsi
 
 gpg4win-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-			gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
 		        $(foosum_exe) \
 			$(README_files) $(HOWTO_files) \
 			versioninfo.txt
@@ -502,7 +501,6 @@ gpg4win-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
 		-DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi > $@
 
 gpg4win-light-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-			gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
 		        $(foosum_exe) \
 			$(README_files) $(HOWTO_files) \
 		        versioninfo.txt
@@ -512,7 +510,6 @@ gpg4win-light-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
 		-DSRCDIR=$(srcdir) -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi > $@
 
 gpg4win-vanilla-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
-			gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
 		        $(foosum_exe) \
 			$(README_files) $(HOWTO_files) \
                         versioninfo.txt
@@ -544,18 +541,6 @@ g4wihelp.dll: g4wihelp.c exdll.h
 	   -lwinmm -lgdi32
 	$(STRIP) g4wihelp.dll
 
-gpgwrap.exe: gpgwrap.c
-	$(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -o $@ $^
-	$(STRIP) $@
-
-gpgwrap-2.exe: gpgwrap.c
-	$(CC) -I. -I.. -DHAVE_CONFIG_H -DGPGWRAP_VARIANT=2 -O2 -o $@ $^
-	$(STRIP) $@
-
-kleowrap.exe: kleowrap.c
-	$(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -mwindows -o $@ $^
-	$(STRIP) $@
-
 sha1sum.exe: sha1sum.c
 	$(CC) -O2 -o $@ $^
 	$(STRIP) $@
diff --git a/src/gpgwrap.c b/src/gpgwrap.c
deleted file mode 100644
index a3820f1..0000000
--- a/src/gpgwrap.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/* gpgwrap.c - Wrapper to call gpg udner Windows.
- * Copyright (C) 2007 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 <http://www.gnu.org/licenses/>.
- */
-
-/* The operation mode of this wrapper can be controlled by the
-   GPGWRAP_VARIANT macro.  The following variants are defined:
-
-     0 = Standard.
-     2 = Also insert a "2" right before the .exe.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <process.h>
-#include <windows.h>
-
-
-#if GPGWRAP_VARIANT == 2
-# define PGM_SUFFIX "-2"
-#else
-# define PGM_SUFFIX ""
-#endif
-
-
-/* Return a copy of ARGV, but with proper quoting.  To release the
-   copy, you have to free argv_quoted[0] and argv_quoted.  */
-static char **
-build_commandline (const char * const *argv)
-{
-  int i;
-  int j;
-  int n = 0;
-  char *buf;
-  char *p;
-  char **argv_quoted;
-
-  /* We have to quote some things because under Windows the program
-     parses the commandline and does some unquoting.  We enclose the
-     whole argument in double-quotes, and escape literal double-quotes
-     as well as backslashes with a backslash.  We end up with a
-     trailing space at the end of the line, but that is harmless.  */
-  for (i = 0; argv[i]; i++)
-    {
-      p = (char *) argv[i];
-      /* The leading double-quote.  */
-      n++;
-      while (*p)
-	{
-	  /* An extra one for each literal that must be escaped.  */
-	  if (*p == '\\' || *p == '"')
-	    n++;
-	  n++;
-	  p++;
-	}
-      /* The trailing double-quote and the delimiter.  */
-      n += 2;
-    }
-  /* And a trailing zero.  */
-  n++;
-
-  /* Allocate a new vector.  */
-  argv_quoted = malloc (sizeof (char *) * (i + 1));
-  if (!argv_quoted)
-    return NULL;
-
-  buf = p = malloc (n);
-  if (!buf)
-    {
-      free (argv_quoted);
-      return NULL;
-    }
-
-  for (i = 0; argv[i]; i++)
-    {
-      const char *argvp = argv[i];
-
-      argv_quoted[i] = p;
-
-      *(p++) = '"';
-      while (*argvp)
-	{
-	  if (*argvp == '\\' || *argvp == '"')
-	    *(p++) = '\\';
-	  *(p++) = *(argvp++);
-	}
-      *(p++) = '"';
-      *(p++) = 0;
-    }
-  *(p++) = 0;
-  argv_quoted[i] = NULL;
-
-  return argv_quoted;
-}
-
-
-int
-main (int argc, const char * const *argv)
-{
-  int rc;
-  char pgm[MAX_PATH+100];
-  char *p, *p0;
-  char **argv_quoted;
-
-  /* Note: We decrement by one to allow inserting one character.  */
-  if (!GetModuleFileNameA (NULL, pgm, sizeof (pgm) - 1 - 1))
-    {
-      fprintf (stderr, "gpgwrap: error getting my own name: rc=%d\n",
-               GetLastError());
-      return 2;
-    }
-
-  /* Remove one directory part of the file name.  */
-  p = strrchr (pgm, '\\');
-  if (!p)
-    goto leave;
-  *p = 0;
-  p0 = strrchr (pgm, '\\');
-  *p = '\\';
-  if (!p0)
-    goto leave;
-  while (*p)
-    *p0++ = *p++;
-  *p0 = 0;
-
-#if GPGWRAP_VARIANT == 2
-  p = strrchr (pgm, '.');
-  if (p)
-    {
-      memmove (p+1, p, strlen (p)+1);
-      *p = '2';
-    }
-#endif /* GPGWRAP_VARIANT == 2 */
-
-
-  /* Hack to output our own version along with the real file name
-     before the actual, we require that the --version option is given
-     twice. */
-  if (argc > 2
-      && !strcmp(argv[1], "--version")
-      && !strcmp(argv[2], "--version"))
-    {
-      fputs ("gpgwrap" PGM_SUFFIX " (Gpg4win) " PACKAGE_VERSION " ;", stdout);
-      fputs (pgm, stdout);
-      fputc ('\n', stdout);
-      fflush (stdout);
-    }
-
-  argv_quoted = build_commandline (argv);
-  if (!argv_quoted)
-    goto leave;
-
-  /* Using execv does not replace the existing program image, but
-     spawns a new one and daemonizes it, confusing the command line
-     interpreter.  So we have to use spawnv.  */
-  rc = _spawnv (_P_WAIT, pgm, (const char **) argv_quoted);
-  if (rc < 0)
-    {
-      fprintf (stderr, "gpgwrap: executing `%s' failed: %s\n",
-	       pgm, strerror (errno));
-      return 2;
-    }
-
-  return rc;
-
- leave:
-  fprintf (stderr, "gpgwrap: internal error parsing my own name `%s'\n",
-           pgm);
-  return 2;
-}
diff --git a/src/kleowrap.c b/src/kleowrap.c
deleted file mode 100644
index a29d845..0000000
--- a/src/kleowrap.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/* kleowrap.c - Wrapper to call gpg under Windows.
- * Copyright (C) 2007, 2008 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <process.h>
-#include <windows.h>
-#include <errno.h>
-
-
-#define DEBUG_W32_SPAWN 0
-
-
-static HANDLE
-w32_open_null (int for_write)
-{
-  HANDLE hfile;
-
-  hfile = CreateFile ("nul",
-                      for_write ? GENERIC_WRITE : GENERIC_READ,
-                      FILE_SHARE_READ | FILE_SHARE_WRITE,
-                      NULL, OPEN_EXISTING, 0, NULL);
-  return hfile;
-}
-
-
-char *
-stpcpy(char *a,const char *b)
-{
-    while( *b )
-	*a++ = *b++;
-    *a = 0;
-
-    return (char*)a;
-}
-
-
-/* Helper function to build_w32_commandline. */
-static char *
-build_w32_commandline_copy (char *buffer, const char *string)
-{
-  char *p = buffer;
-  const char *s;
-
-  if (!*string) /* Empty string. */
-    p = stpcpy (p, "\"\"");
-  else if (strpbrk (string, " \t\n\v\f\""))
-    {
-      /* Need top do some kind of quoting.  */
-      p = stpcpy (p, "\"");
-      for (s=string; *s; s++)
-        {
-          *p++ = *s;
-          if (*s == '\"')
-            *p++ = *s;
-        }
-      *p++ = '\"';
-      *p = 0;
-    }
-  else
-    p = stpcpy (p, string);
-
-  return p;
-}
-
-
-/* Build a command line for use with W32's CreateProcess.  On success
-   CMDLINE gets the address of a newly allocated string.  */
-static char *
-build_w32_commandline (const char *pgmname, const char * const *argv)
-{
-  int i, n;
-  const char *s;
-  char *buf, *p;
-
-  n = 0;
-  s = pgmname;
-  n += strlen (s) + 1 + 2;  /* (1 space, 2 quoting */
-  for (; *s; s++)
-    if (*s == '\"')
-      n++;  /* Need to double inner quotes.  */
-  for (i=0; (s=argv[i]); i++)
-    {
-      n += strlen (s) + 1 + 2;  /* (1 space, 2 quoting */
-      for (; *s; s++)
-        if (*s == '\"')
-          n++;  /* Need to double inner quotes.  */
-    }
-  n++;
-
-  buf = p = malloc (n);
-  if (! buf)
-    return NULL;
-
-  p = build_w32_commandline_copy (p, pgmname);
-  for (i = 0; argv[i]; i++) 
-    {
-      *p++ = ' ';
-      p = build_w32_commandline_copy (p, argv[i]);
-    }
-
-  return buf;
-}
-
-
-int
-spawn_process_and_wait (const char *pgmname, const char * const *argv)
-{
-  int err;
-  SECURITY_ATTRIBUTES sec_attr;
-  PROCESS_INFORMATION pi = 
-    {
-      NULL,      /* Returns process handle.  */
-      0,         /* Returns primary thread handle.  */
-      0,         /* Returns pid.  */
-      0          /* Returns tid.  */
-    };
-  STARTUPINFO si;
-  int cr_flags;
-  char *cmdline;
-  HANDLE proc;
-  int code;
-  DWORD exc;
-
-  /* Prepare security attributes.  */
-  memset (&sec_attr, 0, sizeof sec_attr);
-  sec_attr.nLength = sizeof sec_attr;
-  sec_attr.bInheritHandle = FALSE;
-  
-  /* Build the command line.  */
-  cmdline = build_w32_commandline (pgmname, argv);
-  if (! cmdline)
-    return -1; 
-
-  /* Start the process.  Note that we can't run the PREEXEC function
-     because this would change our own environment. */
-  memset (&si, 0, sizeof si);
-  si.cb = sizeof (si);
-  si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
-  si.wShowWindow = DEBUG_W32_SPAWN ? SW_SHOW : SW_MINIMIZE;
-  si.hStdInput = w32_open_null (0);
-  si.hStdOutput = w32_open_null (1);
-  si.hStdError = w32_open_null (1);
-
-  cr_flags = (CREATE_DEFAULT_ERROR_MODE
-              | DETACHED_PROCESS
-              | GetPriorityClass (GetCurrentProcess ())
-              | CREATE_SUSPENDED); 
-  if (!CreateProcess (pgmname,       /* Program to start.  */
-                      cmdline,       /* Command line arguments.  */
-                      &sec_attr,     /* Process security attributes.  */
-                      &sec_attr,     /* Thread security attributes.  */
-                      TRUE,          /* Inherit handles.  */
-                      cr_flags,      /* Creation flags.  */
-                      NULL,          /* Environment.  */
-                      NULL,          /* Use current drive/directory.  */
-                      &si,           /* Startup information. */
-                      &pi            /* Returns process information.  */
-                      ))
-    {
-      free (cmdline);
-      CloseHandle (si.hStdInput);
-      CloseHandle (si.hStdOutput);
-      CloseHandle (si.hStdError);
-      return -1;
-    }
-  free (cmdline);
-  cmdline = NULL;
-
-  /* Process has been created suspended; resume it now. */
-  ResumeThread (pi.hThread);
-  CloseHandle (pi.hThread); 
-
-  /* Wait for it to finish.  */
-
-  proc = pi.hProcess;
-  err = 0;
-
-  code = WaitForSingleObject (proc, INFINITE);
-  switch (code) 
-    {
-      case WAIT_OBJECT_0:
-        if (! GetExitCodeProcess (proc, &exc))
-	  err = -1;
-	else
-	  err = exc;
-	break;
-
-      default:
-	err = -1;
-        break;
-    }
-
-  CloseHandle (proc);
-
-  return err;
-}
-
-
-/* Assumes that the current working directory is the Gpg4win INSTDIR
-   installation directory.  */
-int
-run_kbuildsycoca (void)
-{
-  const char *argv[1];
-  int rc;
-
-  if (! SetEnvironmentVariable ("XDG_DATA_DIRS", "share")
-      || ! SetEnvironmentVariable ("XDG_CONFIG_DIRS", "etc\\xdg"))
-    {
-      fprintf (stderr, "Executing kbuildsycoca4.exe failed: "
-	       "Could not set XDG environment variables\n");
-      return -1;
-    }
-
-  argv[0] = NULL;
-  rc = spawn_process_and_wait ("bin\\kbuildsycoca4.exe", argv);
-  if (rc)
-    fprintf (stderr, "Executing bin\\kbuildsycoca4.exe failed: %i\n", rc);
-
-  return rc;
-}
-
-
-/* Return a copy of ARGV, but with proper quoting.  To release the
-   copy, you have to free argv_quoted[0] and argv_quoted.  */
-static char **
-build_commandline (const char * const *argv)
-{
-  int i;
-  int j;
-  int n = 0;
-  char *buf;
-  char *p;
-  char **argv_quoted;
-
-  /* We have to quote some things because under Windows the program
-     parses the commandline and does some unquoting.  We enclose the
-     whole argument in double-quotes, and escape literal double-quotes
-     as well as backslashes with a backslash.  We end up with a
-     trailing space at the end of the line, but that is harmless.  */
-  for (i = 0; argv[i]; i++)
-    {
-      p = (char *) argv[i];
-      /* The leading double-quote.  */
-      n++;
-      while (*p)
-	{
-	  /* An extra one for each literal that must be escaped.  */
-	  if (*p == '\\' || *p == '"')
-	    n++;
-	  n++;
-	  p++;
-	}
-      /* The trailing double-quote and the delimiter.  */
-      n += 2;
-    }
-  /* And a trailing zero.  */
-  n++;
-
-  /* Allocate a new vector.  */
-  argv_quoted = malloc (sizeof (char *) * (i + 1));
-  if (!argv_quoted)
-    return NULL;
-
-  buf = p = malloc (n);
-  if (!buf)
-    {
-      free (argv_quoted);
-      return NULL;
-    }
-
-  for (i = 0; argv[i]; i++)
-    {
-      const char *argvp = argv[i];
-
-      argv_quoted[i] = p;
-
-      *(p++) = '"';
-      while (*argvp)
-	{
-	  if (*argvp == '\\' || *argvp == '"')
-	    *(p++) = '\\';
-	  *(p++) = *(argvp++);
-	}
-      *(p++) = '"';
-      *(p++) = 0;
-    }
-  *(p++) = 0;
-  argv_quoted[i] = NULL;
-
-  return argv_quoted;
-}
-
-static void
-kleowrap_set_dll_directory (const char *path)
-{
-  /* Set DLL directory is only necessary on Windows XP after SP2
-     but it is also only available on those systems */
-  typedef BOOL (CALLBACK* LPFNSETDLLDIRECTORY)(LPCTSTR);
-  LPFNSETDLLDIRECTORY my_set_dll_directory;
-
-  HMODULE hmod;
-
-  if (!(hmod = GetModuleHandle ("kernel32.dll")))
-    {
-      fprintf (stderr, "kleowrap: failed to get kernel32.dll handle: rc=%d\n",
-               GetLastError());
-      return;
-    }
-
-  my_set_dll_directory =
-    (LPFNSETDLLDIRECTORY) GetProcAddress (hmod, "SetDllDirectoryA");
-
-  if (!my_set_dll_directory)
-    {
-      /* Not supported and so not necessary */
-      return;
-    }
-
-  if (!my_set_dll_directory (path))
-    {
-      fprintf (stderr, "kleowrap: failed to set module handle",
-               GetLastError());
-      return;
-    }
-}
-
-int
-main (int argc, const char * const *argv)
-{
-  int rc;
-  char pgm[MAX_PATH+100];
-  char *p, *p0;
-  char **argv_quoted;
-
-
-  if (!GetModuleFileNameA (NULL, pgm, sizeof (pgm) - 1))
-    {
-      fprintf (stderr, "kleowrap: error getting my own name: rc=%d\n",
-               GetLastError());
-      return 2;
-    }
-
-  /* Switch directory and insert bin directory.  */
-  p = strrchr (pgm, '\\');
-  if (!p)
-    goto leave;
-  *p = '\0';
-  chdir (pgm);
-  kleowrap_set_dll_directory (pgm);
-  *(p++) = '\\';
-  memmove (p + 4, p, strlen (p) + 1);
-  strncpy (p, "bin\\", 4);
-
-  /* Hack to output our own version along with the real file name
-     before the actual, we require that the --version option is given
-     twice. */
-  if (argc > 2
-      && !strcmp(argv[1], "--version")
-      && !strcmp(argv[2], "--version"))
-    {
-      fputs ("kleowrap (Gpg4win) " PACKAGE_VERSION " ;", stdout);
-      fputs (pgm, stdout);
-      fputc ('\n', stdout);
-      fflush (stdout);
-    }
-
-  argv_quoted = build_commandline (argv);
-  if (! argv_quoted)
-    goto leave;
-
-  /* Now that the current working is INSTDIR, try to run kbuildsycoca
-     (create/update plugin cache).  We don't check the return value,
-     as kbuildsycoca is allowed to fail (and will if kleopatra is
-     already running).  */
-  run_kbuildsycoca();
-
-  /* Using execv does not replace the existing program image, but
-     spawns a new one and daemonizes it, confusing the command line
-     interpreter.  So we have to use spawnv.  */
-  rc = _spawnv (_P_NOWAIT, pgm, (const char **) argv_quoted);
-  if (rc < 0)
-    {
-      fprintf (stderr, "kleowrap: executing `%s' failed: %s\n",
-	       pgm, strerror (errno));
-      return 2;
-    }
-
-  return rc;
-
- leave:
-  fprintf (stderr, "kleowrap: internal error parsing my own name `%s'\n",
-           pgm);
-  return 2;
-}

commit b1a6967efb43d6d0ce5508bab6ac8a71b1a72ba8
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 8 14:43:21 2016 +0100

    Install binaries into bin subfolder
    
    * src/gpgol.nsi, src/gpgex.nsi: Install x64 binaries in bin_64
    * src/gpa.nsi: Do not install into pub.
    * src/inst-atk.nsi
      src/inst-cairo.nsi
      src/inst-dbus.nsi,
      src/inst-expat.nsi,
      src/inst-fontconfig.nsi,
      src/inst-freetype.nsi,
      src/inst-gdk-pixbuf.nsi,
      src/inst-gettext.nsi,
      src/inst-glib.nsi,
      src/inst-gpa.nsi,
      src/inst-gpg4win.nsi,
      src/inst-gpgex.nsi,
      src/inst-gpgme.nsi,
      src/inst-gpgol.nsi,
      src/inst-gtk+.nsi,
      src/inst-kleopatra.nsi,
      src/inst-libassuan.nsi,
      src/inst-libffi.nsi,
      src/inst-libgpg-error.nsi,
      src/inst-libiconv.nsi,
      src/inst-libpng.nsi,
      src/inst-pango.nsi,
      src/inst-paperkey.nsi,
      src/inst-pinentry.nsi,
      src/inst-qtbase.nsi,
      src/inst-sections.nsi,
      src/inst-w32pth.nsi,
      src/inst-zlib.nsi,
      src/uninst-atk.nsi,
      src/uninst-cairo.nsi,
      src/uninst-claws-mail-cmds.nsi,
      src/uninst-dbus.nsi,
      src/uninst-expat.nsi,
      src/uninst-fontconfig.nsi,
      src/uninst-freetype.nsi,
      src/uninst-gdk-pixbuf.nsi,
      src/uninst-gettext.nsi,
      src/uninst-glib.nsi,
      src/uninst-gpa.nsi,
      src/uninst-gpg4win.nsi,
      src/uninst-gpgex.nsi,
      src/uninst-gpgme.nsi,
      src/uninst-gpgol.nsi,
      src/uninst-gtk+.nsi,
      src/uninst-kleopatra.nsi,
      src/uninst-libassuan.nsi,
      src/uninst-libffi.nsi,
      src/uninst-libgpg-error.nsi,
      src/uninst-libiconv.nsi,
      src/uninst-libpng.nsi,
      src/uninst-pango.nsi,
      src/uninst-paperkey.nsi,
      src/uninst-pinentry.nsi,
      src/uninst-qtbase.nsi,
      src/uninst-w32pth.nsi,
      src/uninst-zlib.nsi: Install binaries into bin.
    
    --
    This removes the need for Kleowrap. This will also fix
    "Pinned to taskbar" Kleopatra instances where the shortcut
    would not be to Kleowrap otherwise.
    
    Basically this should fix most of the reports where
    Kleopatra fails to start because DLL's can't be found.

diff --git a/src/inst-atk.nsi b/src/inst-atk.nsi
index 38f0763..2791243 100644
--- a/src/inst-atk.nsi
+++ b/src/inst-atk.nsi
@@ -32,6 +32,7 @@ Section "-atk" SEC_atk
 !ifdef SOURCES
   File ${gpg4win_pkg_atk_src}
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/libatk-1.0-0.dll
 
   SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
diff --git a/src/inst-cairo.nsi b/src/inst-cairo.nsi
index 5de16f0..e1468d2 100644
--- a/src/inst-cairo.nsi
+++ b/src/inst-cairo.nsi
@@ -32,6 +32,7 @@ Section "-cairo" SEC_cairo
 !ifdef SOURCES
   File "${gpg4win_pkg_cairo_src}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   File ${prefix}/bin/libcairo-2.dll
   File ${prefix}/bin/libcairo-gobject-2.dll
diff --git a/src/inst-dbus.nsi b/src/inst-dbus.nsi
index 5096d56..e213096 100644
--- a/src/inst-dbus.nsi
+++ b/src/inst-dbus.nsi
@@ -32,7 +32,6 @@ Section "-dbus" SEC_dbus
 !ifdef SOURCES
   File "${gpg4win_pkg_dbus_src}"
 !else
-  # FIXME: Figure out how to relocate dbus-daemon (and kleopatra).
   SetOutPath "$INSTDIR\bin"
   ClearErrors
   SetOverwrite try
@@ -41,7 +40,6 @@ Section "-dbus" SEC_dbus
   IfErrors 0 +3
       File /oname=dbus-daemon.exe.tmp ${prefix}/bin/dbus-daemon.exe
       Rename /REBOOTOK dbus-daemon.exe.tmp dbus-daemon.exe
-  SetOutPath "$INSTDIR"
 
   File ${prefix}/bin/dbus-launch.exe
   File ${prefix}/bin/dbus-env.bat
diff --git a/src/inst-expat.nsi b/src/inst-expat.nsi
index 02bed7f..3885ada 100644
--- a/src/inst-expat.nsi
+++ b/src/inst-expat.nsi
@@ -32,6 +32,7 @@ Section "-expat" SEC_expat
 !ifdef SOURCES
   File "${gpg4win_pkg_expat_src}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   File ${prefix}/bin/libexpat-1.dll
 
diff --git a/src/inst-fontconfig.nsi b/src/inst-fontconfig.nsi
index 60ce6f7..db0a7ca 100644
--- a/src/inst-fontconfig.nsi
+++ b/src/inst-fontconfig.nsi
@@ -32,6 +32,7 @@ Section "-fontconfig" SEC_fontconfig
 !ifdef SOURCES
   File "${gpg4win_pkg_fontconfig_src}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   File ${prefix}/bin/libfontconfig-1.dll
   SetOutPath "$INSTDIR\etc\fonts"
diff --git a/src/inst-freetype.nsi b/src/inst-freetype.nsi
index e1b9b34..404884a 100644
--- a/src/inst-freetype.nsi
+++ b/src/inst-freetype.nsi
@@ -32,6 +32,7 @@ Section "-freetype" SEC_freetype
 !ifdef SOURCES
   File "${gpg4win_pkg_freetype_src}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   File ${prefix}/bin/freetype6.dll
 
diff --git a/src/inst-gdk-pixbuf.nsi b/src/inst-gdk-pixbuf.nsi
index f755c3e..75eecb2 100644
--- a/src/inst-gdk-pixbuf.nsi
+++ b/src/inst-gdk-pixbuf.nsi
@@ -31,6 +31,8 @@ Section "-gdk_pixbuf" SEC_gdk_pixbuf
 !ifdef SOURCES
   File ${gpg4win_pkg_gdk_pixbuf}
 !else
+  SetOutPath "$INSTDIR\bin"
+
   File ${prefix}/bin/libgdk_pixbuf-2.0-0.dll
   File ${prefix}/bin/gdk-pixbuf-query-loaders.exe
   File ${prefix}/bin/gdk-pixbuf-pixdata.exe
diff --git a/src/inst-gettext.nsi b/src/inst-gettext.nsi
index 975345a..2bd3891 100644
--- a/src/inst-gettext.nsi
+++ b/src/inst-gettext.nsi
@@ -32,6 +32,7 @@ Section "-gettext" SEC_gettext
 !ifdef SOURCES
   File ${gpg4win_pkg_gettext}
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/libintl-8.dll
   File /oname=intl.dll ${prefix}/bin/libintl-8.dll
 
diff --git a/src/inst-glib.nsi b/src/inst-glib.nsi
index 417ed51..5932863 100644
--- a/src/inst-glib.nsi
+++ b/src/inst-glib.nsi
@@ -31,6 +31,7 @@ Section "-glib" SEC_glib
 !ifdef SOURCES
   File ${gpg4win_pkg_glib}
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/gspawn-win32-helper.exe
   File ${prefix}/bin/gspawn-win32-helper-console.exe
   File ${prefix}/bin/libglib-2.0-0.dll
diff --git a/src/inst-gpa.nsi b/src/inst-gpa.nsi
index aadef77..28a40cb 100644
--- a/src/inst-gpa.nsi
+++ b/src/inst-gpa.nsi
@@ -38,11 +38,9 @@
 !ifdef SOURCES
   File "${gpg4win_pkg_gpa}"
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/gpa.exe
 
-  SetOutPath "$INSTDIR\pub"
-  File /oname=gpa.exe "${BUILD_DIR}/gpgwrap.exe"
-
   SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
   File ${prefix}/share/locale/de/LC_MESSAGES/gpa.mo
 
diff --git a/src/inst-gpg4win.nsi b/src/inst-gpg4win.nsi
index 4b7c51a..6b530a9 100644
--- a/src/inst-gpg4win.nsi
+++ b/src/inst-gpg4win.nsi
@@ -89,7 +89,7 @@ skip_uninst:
   DetailPrint "Deleted obsolete gpgProgram value"
 
   # Install gpg4win included tools
-  SetOutPath "$INSTDIR"
+  SetOutPath "$INSTDIR\bin"
   File "${BUILD_DIR}/sha1sum.exe"
   File "${BUILD_DIR}/sha256sum.exe"
   File "${BUILD_DIR}/md5sum.exe"
diff --git a/src/inst-gpgex.nsi b/src/inst-gpgex.nsi
index 8eced8d..4f22b9e 100644
--- a/src/inst-gpgex.nsi
+++ b/src/inst-gpgex.nsi
@@ -32,7 +32,7 @@ Section "-removegpgee"
 # Uninstall a previous gpgee version, if it exists.
   ifFileExists "$INSTDIR\GPGee.dll" 0 gpgex_no_gpgee
     UnRegDLL "$INSTDIR\GPGee.dll"
-    Delete /REBOOTOK "$INSTDIR\GPGee.dll"
+    Delete /REBOOTOK "$INSTDIR\bin\GPGee.dll"
     Delete /REBOOTOK "$INSTDIR\GPGee.DEU"
     Delete "$INSTDIR\GPGee.hlp"
     Delete "$INSTDIR\share\gpgee\gpl.txt"
@@ -49,6 +49,7 @@ ${MementoSection} "GpgEX" SEC_gpgex
 !ifdef SOURCES
   File "${gpg4win_pkg_gpgex}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   ClearErrors
   SetOverwrite try
@@ -61,7 +62,7 @@ ${MementoSection} "GpgEX" SEC_gpgex
  do_reg:
   # Register the DLL.
   ClearErrors
-  RegDLL "$INSTDIR\gpgex.dll"
+  RegDLL "$INSTDIR\bin\gpgex.dll"
   ifErrors 0 +2
      MessageBox MB_OK "$(T_GpgEX_RegFailed)"
 
@@ -92,7 +93,7 @@ ${MementoSection} "GpgEX" SEC_gpgex
 ${If} ${RunningX64}
 
   # Install the 64 bit version of the dll.
-  SetOutPath "$INSTDIR\bin"
+  SetOutPath "$INSTDIR\bin_64"
   ClearErrors
   SetOverwrite try
   File ${exprefix}/bin/gpgex.dll
@@ -106,7 +107,7 @@ ${If} ${RunningX64}
   # RegDLL can't be used for 64 bit and InstallLib seems to be a
   # registry hack.
   ClearErrors
-  ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin\gpgex.dll"'
+  ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin_64\gpgex.dll"'
   ifErrors 0 +2
      MessageBox MB_OK "$(T_GpgEX_RegFailed) (64 bit)"
 
diff --git a/src/inst-gpgme.nsi b/src/inst-gpgme.nsi
index 8b8e8d5..9233e5c 100644
--- a/src/inst-gpgme.nsi
+++ b/src/inst-gpgme.nsi
@@ -32,6 +32,7 @@ Section "-gpgme" SEC_gpgme
 !ifdef SOURCES
   File "${gpg4win_pkg_gpgme}"
 !else
+  SetOutPath "$INSTDIR\bin"
   ClearErrors
   SetOverwrite try
   File "${prefix}/bin/libgpgme-11.dll"
diff --git a/src/inst-gpgol.nsi b/src/inst-gpgol.nsi
index d80dc59..33eeff6 100644
--- a/src/inst-gpgol.nsi
+++ b/src/inst-gpgol.nsi
@@ -34,6 +34,7 @@ ${MementoSection} "GpgOL" SEC_gpgol
   File "${gpg4win_pkg_gpgol}"
 !else
 
+  SetOutPath "$INSTDIR\bin"
   ClearErrors
   SetOverwrite try
   File ${prefix}/bin/gpgol.dll
@@ -44,7 +45,7 @@ ${MementoSection} "GpgOL" SEC_gpgol
 
  do_reg:
   # Register the DLL.
-  RegDLL "$INSTDIR\gpgol.dll"
+  RegDLL "$INSTDIR\bin\gpgol.dll"
   ifErrors 0 +2
      MessageBox MB_OK "$(T_GpgOL_RegFailed)"
 
@@ -71,7 +72,7 @@ ${MementoSection} "GpgOL" SEC_gpgol
 ${If} ${RunningX64}
 
   # Install the 64 bit version of the dll.
-  SetOutPath "$INSTDIR\bin"
+  SetOutPath "$INSTDIR\bin_64"
   ClearErrors
   SetOverwrite try
   File ${exprefix}/bin/gpgol.dll
@@ -85,7 +86,7 @@ ${If} ${RunningX64}
   # RegDLL can't be used for 64 bit and InstallLib seems to be a
   # registry hack.
   ClearErrors
-  ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin\gpgol.dll"'
+  ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin_64\gpgol.dll"'
   ifErrors 0 +2
      MessageBox MB_OK "$(T_GpgOL_RegFailed) (64 bit)"
 ${EndIf}
diff --git a/src/inst-gtk+.nsi b/src/inst-gtk+.nsi
index ecd5a67..2667f50 100644
--- a/src/inst-gtk+.nsi
+++ b/src/inst-gtk+.nsi
@@ -32,6 +32,7 @@ Section "-gtk+" SEC_gtk_
 !ifdef SOURCES
   File "${gpg4win_pkg_gtk_}"
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/libgdk-win32-2.0-0.dll
   File ${prefix}/bin/libgtk-win32-2.0-0.dll
 
diff --git a/src/inst-kleopatra.nsi b/src/inst-kleopatra.nsi
index c126d97..bab6f58 100644
--- a/src/inst-kleopatra.nsi
+++ b/src/inst-kleopatra.nsi
@@ -35,19 +35,12 @@ ${MementoSection} "Kleopatra" SEC_kleopatra
   SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/kleopatra.exe
   File ${prefix}/bin/kdebugdialog.exe
-  File ${prefix}/bin/kgpgconf.exe
   File ${prefix}/bin/kwatchgnupg.exe
   File ${prefix}/bin/kbuildsycoca4.exe
 
   # Path lookups are relative to libkdecore so it currently needs to be
   # in bin
   File ${prefix}/bin/libkdecore.dll
-  SetOutPath "$INSTDIR"
-  File /oname=kleopatra.exe "${BUILD_DIR}/kleowrap.exe"
-  File /oname=kdebugdialog.exe "${BUILD_DIR}/kleowrap.exe"
-  File /oname=kbuildsycoca4.exe "${BUILD_DIR}/kleowrap.exe"
-  File /oname=kgpgconf.exe "${BUILD_DIR}/kleowrap.exe"
-  File /oname=kwatchgnupg.exe "${BUILD_DIR}/kleowrap.exe"
 
 #  File ${prefix}/bin/kcmdwrapper.exe
   File ${prefix}/bin/libattica.dll
diff --git a/src/inst-libassuan.nsi b/src/inst-libassuan.nsi
index deb338a..bba43f1 100644
--- a/src/inst-libassuan.nsi
+++ b/src/inst-libassuan.nsi
@@ -34,6 +34,7 @@ Section "-libassuan" SEC_libassuan
 !ifdef SOURCES
   File "${gpg4win_pkg_libassuan}"
 !else
+  SetOutPath "$INSTDIR\bin"
   ClearErrors
   SetOverwrite try
   File "${prefix}/bin/libassuan-0.dll"
diff --git a/src/inst-libffi.nsi b/src/inst-libffi.nsi
index 59ba654..2a32425 100644
--- a/src/inst-libffi.nsi
+++ b/src/inst-libffi.nsi
@@ -31,6 +31,7 @@ Section "-libffi" SEC_libffi
 !ifdef SOURCES
   File ${gpg4win_pkg_libffi}
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/libffi-6.dll
 !endif
 SectionEnd
diff --git a/src/inst-libgpg-error.nsi b/src/inst-libgpg-error.nsi
index fb689c3..2a6ebea 100644
--- a/src/inst-libgpg-error.nsi
+++ b/src/inst-libgpg-error.nsi
@@ -33,6 +33,7 @@ Section "-libgpg-error" SEC_libgpg_error
 !ifdef SOURCES
   File "${gpg4win_pkg_libgpg_error}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   ClearErrors
   SetOverwrite try
@@ -52,7 +53,7 @@ Section "-libgpg-error" SEC_libgpg_error
   SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
   File ${prefix}/share/locale/fr/LC_MESSAGES/libgpg-error.mo
 
-  SetOutPath "$INSTDIR"
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/gpg-error.exe
 
   SetOutPath "$INSTDIR\lib"
diff --git a/src/inst-libiconv.nsi b/src/inst-libiconv.nsi
index 814b5d3..1830e0f 100644
--- a/src/inst-libiconv.nsi
+++ b/src/inst-libiconv.nsi
@@ -33,6 +33,7 @@ Section "-libiconv" SEC_libiconv
 !ifdef SOURCES
   File "${gpg4win_pkg_libiconv}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   ClearErrors
   SetOverwrite try
@@ -52,16 +53,6 @@ Section "-libiconv" SEC_libiconv
       File /oname=iconv.dll.tmp "${prefix}/bin/libiconv-2.dll"
       Rename /REBOOTOK iconv.dll.tmp iconv.dll
 
-  # Install a copy in pub; this is a bad hack and should be removed ASAP.
-  SetOutPath "$INSTDIR\pub"
-  ClearErrors
-  SetOverwrite try
-  File /oname=iconv.dll "${prefix}/bin/libiconv-2.dll"
-  SetOverwrite lastused
-  ifErrors 0 +3
-      File /oname=iconv.dll.tmp "${prefix}/bin/libiconv-2.dll"
-      Rename /REBOOTOK iconv.dll.tmp iconv.dll
-
   SetOutPath "$INSTDIR\lib"
   File ${prefix}/lib/charset.alias
 
diff --git a/src/inst-libpng.nsi b/src/inst-libpng.nsi
index c03abeb..6388b85 100644
--- a/src/inst-libpng.nsi
+++ b/src/inst-libpng.nsi
@@ -32,6 +32,7 @@ Section "-libpng" SEC_libpng
 !ifdef SOURCES
   File "${gpg4win_pkg_libpng}"
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/libpng14-14.dll
 !endif
 SectionEnd
diff --git a/src/inst-pango.nsi b/src/inst-pango.nsi
index e028b0f..07b3193 100644
--- a/src/inst-pango.nsi
+++ b/src/inst-pango.nsi
@@ -31,6 +31,7 @@ Section "-pango" SEC_pango
 !ifdef SOURCES
   File "${gpg4win_pkg_pango_src}"
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/pango-querymodules.exe
   File ${prefix}/bin/libpango-1.0-0.dll
   File ${prefix}/bin/libpangoft2-1.0-0.dll
diff --git a/src/inst-paperkey.nsi b/src/inst-paperkey.nsi
index 27636a9..e3e219d 100644
--- a/src/inst-paperkey.nsi
+++ b/src/inst-paperkey.nsi
@@ -32,6 +32,7 @@ Section "-Paperkey" SEC_paperkey
 !ifdef SOURCES
   File "${gpg4win_pkg_paperkey}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   File "${prefix}/bin/paperkey.exe"
 
diff --git a/src/inst-pinentry.nsi b/src/inst-pinentry.nsi
index b9aa508..ec826a5 100644
--- a/src/inst-pinentry.nsi
+++ b/src/inst-pinentry.nsi
@@ -34,6 +34,7 @@ Section "-Pinentry" SEC_pinentry
 !ifdef SOURCES
   File "${gpg4win_pkg_pinentry}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   File "${prefix}/bin/pinentry-w32.exe"
 !ifdef GPG4WIN_VANILLA
diff --git a/src/inst-qtbase.nsi b/src/inst-qtbase.nsi
index da4e99b..343e7e9 100644
--- a/src/inst-qtbase.nsi
+++ b/src/inst-qtbase.nsi
@@ -25,14 +25,15 @@
 !define prefix ${ipdir}/qtbase-${gpg4win_pkg_qtbase_version}
 
 !ifdef DEBUG
-Section "qtbase" SEC_qt
+Section "qtbase" SEC_qtbase
 !else
-Section "-qtbase" SEC_qt
+Section "-qtbase" SEC_qtbase
 !endif
   SetOutPath "$INSTDIR"
 !ifdef SOURCES
   File "${gpg4win_pkg_qtbase}"
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/Qt5Core.dll
   File ${prefix}/bin/Qt5Gui.dll
   File ${prefix}/bin/Qt5Widgets.dll
diff --git a/src/inst-sections.nsi b/src/inst-sections.nsi
index 3459753..4004cba 100644
--- a/src/inst-sections.nsi
+++ b/src/inst-sections.nsi
@@ -874,7 +874,7 @@ Section "-startmenu"
     IntOp $R0 $R0 & ${SF_SELECTED}
     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_menu
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GPA.lnk" \
-	"$INSTDIR\gpa.exe" \
+	"$INSTDIR\bin\gpa.exe" \
         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
   no_gpa_menu:
 !endif
@@ -884,7 +884,7 @@ Section "-startmenu"
     IntOp $R0 $R0 & ${SF_SELECTED}
     IntCmp $R0 ${SF_SELECTED} 0 no_kleopatra_menu
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Kleopatra.lnk" \
-	"$INSTDIR\kleopatra.exe" \
+	"$INSTDIR\bin\kleopatra.exe" \
         "" "$INSTDIR\bin\kleopatra.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_kleopatra)
   no_kleopatra_menu:
 !endif
diff --git a/src/inst-w32pth.nsi b/src/inst-w32pth.nsi
index d31a40a..184929c 100644
--- a/src/inst-w32pth.nsi
+++ b/src/inst-w32pth.nsi
@@ -34,6 +34,7 @@ Section "-w32pth" SEC_w32pth
 !ifdef SOURCES
   File "${gpg4win_pkg_w32pth}"
 !else
+  SetOutPath "$INSTDIR\bin"
 
   ClearErrors
   SetOverwrite try
diff --git a/src/inst-zlib.nsi b/src/inst-zlib.nsi
index 1634510..1095021 100644
--- a/src/inst-zlib.nsi
+++ b/src/inst-zlib.nsi
@@ -32,6 +32,7 @@ Section "-zlib" SEC_zlib
 !ifdef SOURCES
   File "${gpg4win_pkg_zlib}"
 !else
+  SetOutPath "$INSTDIR\bin"
   File ${prefix}/bin/zlib1.dll
 !endif
 SectionEnd
diff --git a/src/uninst-atk.nsi b/src/uninst-atk.nsi
index 1f87f7f..0df3ce8 100644
--- a/src/uninst-atk.nsi
+++ b/src/uninst-atk.nsi
@@ -66,7 +66,7 @@ Section "-un.atk"
   RMDir "$INSTDIR\share\locale"
   RMDir "$INSTDIR\share"
 
-  Delete /REBOOTOK "$INSTDIR\libatk-1.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libatk-1.0-0.dll"
 
 !endif
 
diff --git a/src/uninst-cairo.nsi b/src/uninst-cairo.nsi
index 08070b9..fe40390 100644
--- a/src/uninst-cairo.nsi
+++ b/src/uninst-cairo.nsi
@@ -30,9 +30,9 @@ Section "-un.cairo"
   Push "${gpg4win_pkg_cairo_src}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libcairo-2.dll"
-  Delete /REBOOTOK "$INSTDIR\libcairo-gobject-2.dll"
-  Delete /REBOOTOK "$INSTDIR\libcairo-script-interpreter-2.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libcairo-2.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libcairo-gobject-2.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libcairo-script-interpreter-2.dll"
 
 !endif
 SectionEnd
diff --git a/src/uninst-claws-mail-cmds.nsi b/src/uninst-claws-mail-cmds.nsi
index ffcfe06..642cc34 100644
--- a/src/uninst-claws-mail-cmds.nsi
+++ b/src/uninst-claws-mail-cmds.nsi
@@ -20,30 +20,30 @@
 
 # We delete this file from the old (and removed) jpeg package, that
 # was only installed if claws was selected.
-Delete "$INSTDIR\jpeg62.dll"
+Delete "$INSTDIR\bin\jpeg62.dll"
 
-Delete "$INSTDIR\claws-mail.exe"
+Delete "$INSTDIR\bin\claws-mail.exe"
 
 Delete "$INSTDIR\claws-mail-manual.pdf"
 
 Delete "$INSTDIR\share\claws-mail\ca-certificates.crt"
-Delete "$INSTDIR\lib\claws-mail\plugins\pgpcore.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\pgpinline.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\pgpcore.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\pgpinline.dll"
 Delete "$INSTDIR\lib\claws-mail\plugins\pgpinline.deps"
-Delete "$INSTDIR\lib\claws-mail\plugins\pgpmime.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\pgpmime.dll"
 Delete "$INSTDIR\lib\claws-mail\plugins\pgpmime.deps"
-Delete "$INSTDIR\lib\claws-mail\plugins\smime.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\smime.dll"
 Delete "$INSTDIR\lib\claws-mail\plugins\smime.deps"
-Delete "$INSTDIR\lib\claws-mail\plugins\address_keeper.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\att_remover.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\attachwarner.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\bsfilter.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\fetchinfo.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\notification.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\tnef_parse.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\rssyl.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\spamreport.dll"
-Delete "$INSTDIR\lib\claws-mail\plugins\vcalendar.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\address_keeper.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\att_remover.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\attachwarner.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\bsfilter.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\fetchinfo.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\notification.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\tnef_parse.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\rssyl.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\spamreport.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\vcalendar.dll"
 
 RMDir "$INSTDIR\lib\claws-mail\plugins"
 RMDir "$INSTDIR\lib\claws-mail"
@@ -79,22 +79,22 @@ DeleteRegKey HKLM "SOFTWARE\Clients\Mail\Claws Mail"
 DeleteRegKey HKLM "SOFTWARE\Classes\Claws-Mail.Url.mailto"
 
 ; libetpan
-Delete "$INSTDIR\libetpan-13.dll"
+Delete "$INSTDIR\bin\libetpan-13.dll"
 
 ; libxml2
-Delete "$INSTDIR\libxml2-2.dll"
+Delete "$INSTDIR\bin\libxml2-2.dll"
 
 ; regex
 # Old version.
-Delete "$INSTDIR\regex.dll"
+Delete "$INSTDIR\bin\regex.dll"
 
-Delete "$INSTDIR\libregex-1.dll"
+Delete "$INSTDIR\bin\libregex-1.dll"
 
 ; crypt had nothing to uninstall
 
 ; enchant
-Delete "$INSTDIR\libenchant-1.dll"
-Delete "$INSTDIR\lib\enchant\libenchant_myspell.dll"
+Delete "$INSTDIR\bin\libenchant-1.dll"
+Delete "$INSTDIR\bin\lib\enchant\libenchant_myspell.dll"
 
 RMDir "$INSTDIR\lib\enchant"
 RMDir "$INSTDIR\lib"
@@ -111,7 +111,7 @@ RMDir "$INSTDIR\share\enchant\myspell"
 RMDIR "$INSTDIR\share\enchant"
 
 ; gtkhtmlviewer2
-Delete "$INSTDIR\lib\claws-mail\plugins\gtkhtml2_viewer.dll"
+Delete "$INSTDIR\bin\lib\claws-mail\plugins\gtkhtml2_viewer.dll"
 RMDir "$INSTDIR\lib\claws-mail\plugins"
 RMDir "$INSTDIR\lib\claws-mail"
 Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gtkhtml2_viewer.mo"
@@ -133,7 +133,7 @@ Delete "$INSTDIR\share\locale\sr\LC_MESSAGES\gtkhtml2_viewer.mo"
 Delete "$INSTDIR\share\locale\zh_CN\LC_MESSAGES\gtkhtml2_viewer.mo"
 
 ; pthreads
-Delete "$INSTDIR\pthreadGC2.dll"
+Delete "$INSTDIR\bin\pthreadGC2.dll"
 
 RMDir "$INSTDIR\share"
 RMDir "$INSTDIR"
diff --git a/src/uninst-dbus.nsi b/src/uninst-dbus.nsi
index 29e12c5..6688a9f 100644
--- a/src/uninst-dbus.nsi
+++ b/src/uninst-dbus.nsi
@@ -30,23 +30,23 @@ Section "-un.dbus"
   Push "${gpg4win_pkg_dbus_src}"
   Call un.SourceDelete
 !else
-  # FIXME: See inst-dbus.nsi.
   Delete /REBOOTOK "$INSTDIR\bin\dbus-daemon.exe"
-  RMDir "$INSTDIR\bin"
 
-  Delete "$INSTDIR\dbus-env.bat"
-  Delete "$INSTDIR\dbus-launch.exe"
-  Delete "$INSTDIR\dbus-monitor.exe"
-  Delete "$INSTDIR\dbus-send.exe"
+  Delete "$INSTDIR\bin\dbus-env.bat"
+  Delete "$INSTDIR\bin\dbus-launch.exe"
+  Delete "$INSTDIR\bin\dbus-monitor.exe"
+  Delete "$INSTDIR\bin\dbus-send.exe"
 
   # FIXME: Force dbus installed in our prefix down.
-  Delete /REBOOTOK "$INSTDIR\libdbus-1.dll"
-  Delete /REBOOTOK "$INSTDIR\libexpat.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libdbus-1.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libexpat.dll"
 
   Delete "$INSTDIR\etc\session.conf"
   Delete "$INSTDIR\etc\system.conf"
   RMDir "$INSTDIR\etc"
 
+  RMDir "$INSTDIR\bin"
+
   RMDir "$INSTDIR"
 !endif
 SectionEnd
diff --git a/src/uninst-expat.nsi b/src/uninst-expat.nsi
index f203d8d..4d70966 100644
--- a/src/uninst-expat.nsi
+++ b/src/uninst-expat.nsi
@@ -30,6 +30,6 @@ Section "-un.expat"
   Push "${gpg4win_pkg_expat_src}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libexpat-1.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libexpat-1.dll"
 !endif
 SectionEnd
diff --git a/src/uninst-fontconfig.nsi b/src/uninst-fontconfig.nsi
index c1b5a23..6acbf4c 100644
--- a/src/uninst-fontconfig.nsi
+++ b/src/uninst-fontconfig.nsi
@@ -30,7 +30,7 @@ Section "-un.fontconfig"
   Push "${gpg4win_pkg_fontconfig_src}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libfontconfig-1.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libfontconfig-1.dll"
   Delete "$INSTDIR\etc\fonts\fonts.conf"
   RMDir "$INSTDIR\etc\fonts"
 
diff --git a/src/uninst-freetype.nsi b/src/uninst-freetype.nsi
index 19bb778..d07bfd2 100644
--- a/src/uninst-freetype.nsi
+++ b/src/uninst-freetype.nsi
@@ -30,6 +30,6 @@ Section "-un.freetype"
   Push "${gpg4win_pkg_freetype_src}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\freetype6.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\freetype6.dll"
 !endif
 SectionEnd
diff --git a/src/uninst-gdk-pixbuf.nsi b/src/uninst-gdk-pixbuf.nsi
index 691f8c2..2fd82aa 100644
--- a/src/uninst-gdk-pixbuf.nsi
+++ b/src/uninst-gdk-pixbuf.nsi
@@ -30,9 +30,9 @@ Section "-un.gdk_pixbuf"
   Call un.SourceDelete
 !else
 
-  Delete /REBOOTOK "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
-  Delete "$INSTDIR\gdk-pixbuf-query-loaders.exe"
-  Delete "$INSTDIR\gdk-pixbuf-pixdata.exe"
+  Delete /REBOOTOK "$INSTDIR\bin\libgdk_pixbuf-2.0-0.dll"
+  Delete "$INSTDIR\bin\gdk-pixbuf-query-loaders.exe"
+  Delete "$INSTDIR\bin\gdk-pixbuf-pixdata.exe"
 
 !endif
 SectionEnd
diff --git a/src/uninst-gettext.nsi b/src/uninst-gettext.nsi
index 001d527..f04eafe 100644
--- a/src/uninst-gettext.nsi
+++ b/src/uninst-gettext.nsi
@@ -30,13 +30,13 @@ Section "-un.gettext"
   Push "${gpg4win_pkg_gettext}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libintl-8.dll"
-  Delete /REBOOTOK "$INSTDIR\intl.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libintl-8.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\intl.dll"
 !ifdef DEBUG
-  Delete "$INSTDIR\gettext.exe"
-  Delete "$INSTDIR\ngettext.exe"
-  Delete "$INSTDIR\envsubst.exe"
-  Delete "$INSTDIR\asprintf.dll"
+  Delete "$INSTDIR\bin\gettext.exe"
+  Delete "$INSTDIR\bin\ngettext.exe"
+  Delete "$INSTDIR\bin\envsubst.exe"
+  Delete "$INSTDIR\bin\asprintf.dll"
 !endif
   RMDir "$INSTDIR"
 !endif
diff --git a/src/uninst-glib.nsi b/src/uninst-glib.nsi
index 6f2f84f..062ddbd 100644
--- a/src/uninst-glib.nsi
+++ b/src/uninst-glib.nsi
@@ -40,24 +40,24 @@ Section "-un.glib"
   RMDir "$INSTDIR\share\glib-2.0\schemas"
   RMDir "$INSTDIR\share\glib-2.0"
 
-  Delete "$INSTDIR\gspawn-win32-helper.exe"
-  Delete "$INSTDIR\gspawn-win32-helper-console.exe"
-  Delete "$INSTDIR\gdbus.exe"
-  Delete "$INSTDIR\gio-querymodules.exe"
-  Delete "$INSTDIR\glib-compile-resources.exe"
-  Delete "$INSTDIR\glib-compile-schemas.exe"
-  Delete "$INSTDIR\glib-genmarshal.exe"
-  Delete "$INSTDIR\gobject-query.exe"
-  Delete "$INSTDIR\gresource.exe"
-  Delete "$INSTDIR\gsettings.exe"
-  Delete "$INSTDIR\gspawn-win32-helper-console.exe"
-  Delete "$INSTDIR\gspawn-win32-helper.exe"
-
-  Delete /REBOOTOK "$INSTDIR\libglib-2.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libgmodule-2.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libgobject-2.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libgthread-2.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libgio-2.0-0.dll"
+  Delete "$INSTDIR\bin\gspawn-win32-helper.exe"
+  Delete "$INSTDIR\bin\gspawn-win32-helper-console.exe"
+  Delete "$INSTDIR\bin\gdbus.exe"
+  Delete "$INSTDIR\bin\gio-querymodules.exe"
+  Delete "$INSTDIR\bin\glib-compile-resources.exe"
+  Delete "$INSTDIR\bin\glib-compile-schemas.exe"
+  Delete "$INSTDIR\bin\glib-genmarshal.exe"
+  Delete "$INSTDIR\bin\gobject-query.exe"
+  Delete "$INSTDIR\bin\gresource.exe"
+  Delete "$INSTDIR\bin\gsettings.exe"
+  Delete "$INSTDIR\bin\gspawn-win32-helper-console.exe"
+  Delete "$INSTDIR\bin\gspawn-win32-helper.exe"
+
+  Delete /REBOOTOK "$INSTDIR\bin\libglib-2.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgmodule-2.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgobject-2.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgthread-2.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgio-2.0-0.dll"
 
 !endif
 SectionEnd
diff --git a/src/uninst-gpa.nsi b/src/uninst-gpa.nsi
index e80ec85..8b58177 100644
--- a/src/uninst-gpa.nsi
+++ b/src/uninst-gpa.nsi
@@ -30,8 +30,7 @@ Section "-un.gpa"
   Push "${gpg4win_pkg_gpa}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\gpa.exe"
-  Delete /REBOOTOK "$INSTDIR\pub\gpa.exe"
+  Delete /REBOOTOK "$INSTDIR\bin\gpa.exe"
 
   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gpa.mo"
   Delete "$INSTDIR\share\locale\ar\LC_MESSAGES\gpa.mo"
diff --git a/src/uninst-gpg4win.nsi b/src/uninst-gpg4win.nsi
index ba54fd4..22820e7 100644
--- a/src/uninst-gpg4win.nsi
+++ b/src/uninst-gpg4win.nsi
@@ -31,15 +31,15 @@ Section "-un.gpg4win"
   Call un.RemoveFromPath
 
   # Delete gpg4win included tools
-  Delete "$INSTDIR\sha1sum.exe"
-  Delete "$INSTDIR\sha256sum.exe"
-  Delete "$INSTDIR\md5sum.exe"
-  Delete "$INSTDIR\mkportable.exe"
+  Delete "$INSTDIR\bin\sha1sum.exe"
+  Delete "$INSTDIR\bin\sha256sum.exe"
+  Delete "$INSTDIR\bin\md5sum.exe"
+  Delete "$INSTDIR\bin\mkportable.exe"
 
   # Delete the runtime libaries
-  Delete "$INSTDIR\libstdc++-6.dll"
-  Delete "$INSTDIR\libgcc_s_sjlj-1.dll"
-  Delete "$INSTDIR\libwinpthread-1.dll"
+  Delete "$INSTDIR\bin\libstdc++-6.dll"
+  Delete "$INSTDIR\bin\libgcc_s_sjlj-1.dll"
+  Delete "$INSTDIR\bin\libwinpthread-1.dll"
 
   # Delete standard stuff.
   Delete "$INSTDIR\share\gpg4win\README.*.txt"
@@ -132,7 +132,7 @@ Section "-un.gpg4win"
 
   # Try again to remove the scdaemon.  This is useful because scdaemon
   # needs some time to stop after gpg-agent has been stopped.
-  Delete "$INSTDIR\scdaemon.exe"
+  Delete "$INSTDIR\bin\scdaemon.exe"
 
   # Try to remove other top directories.
   RMDir "$INSTDIR\lib"
diff --git a/src/uninst-gpgex.nsi b/src/uninst-gpgex.nsi
index f0a79a9..a8d4c2a 100644
--- a/src/uninst-gpgex.nsi
+++ b/src/uninst-gpgex.nsi
@@ -65,13 +65,13 @@ Section "-un.gpgex"
   RMDir "$INSTDIR\share\locale"
   RMDir "$INSTDIR\share"
 
-  UnRegDLL "$INSTDIR\gpgex.dll"
+  UnRegDLL "$INSTDIR\bin\gpgex.dll"
 
-  Delete /REBOOTOK "$INSTDIR\gpgex.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\gpgex.dll"
 
 ${If} ${RunningX64}
-  ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\bin\gpgex.dll"'
-  Delete /REBOOTOK "$INSTDIR\bin\gpgex.dll"
+  ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\bin_64\gpgex.dll"'
+  Delete /REBOOTOK "$INSTDIR\bin_64\gpgex.dll"
 ${EndIf}
 
 !endif
diff --git a/src/uninst-gpgme.nsi b/src/uninst-gpgme.nsi
index b650b4c..fabcf9c 100644
--- a/src/uninst-gpgme.nsi
+++ b/src/uninst-gpgme.nsi
@@ -30,10 +30,10 @@ Section "-un.gpgme"
   Push "${gpg4win_pkg_gpgme}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libgpgme-11.dll"
-  Delete /REBOOTOK "$INSTDIR\libgpgme-glib-11.dll"
-  Delete /REBOOTOK "$INSTDIR\libgpgme-qt-11.dll"
-  Delete "$INSTDIR\gpgme-w32spawn.exe"
+  Delete /REBOOTOK "$INSTDIR\bin\libgpgme-11.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgpgme-glib-11.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgpgme-qt-11.dll"
+  Delete "$INSTDIR\bin\gpgme-w32spawn.exe"
   Delete "$INSTDIR\lib\libgpgme.imp"
   Delete "$INSTDIR\lib\libgpgme-glib.imp"
   Delete "$INSTDIR\include\gpgme.h"
diff --git a/src/uninst-gpgol.nsi b/src/uninst-gpgol.nsi
index 0f6be8b..9f02550 100644
--- a/src/uninst-gpgol.nsi
+++ b/src/uninst-gpgol.nsi
@@ -59,13 +59,13 @@ Section "-un.gpgol"
   RMDir "$INSTDIR\share\locale"
   RMDir "$INSTDIR\share\"
 
-  UnRegDLL "$INSTDIR\gpgol.dll"
+  UnRegDLL "$INSTDIR\bin\gpgol.dll"
 
-  Delete /REBOOTOK "$INSTDIR\gpgol.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\gpgol.dll"
 
 ${If} ${RunningX64}
-  ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\bin\gpgol.dll"'
-  Delete /REBOOTOK "$INSTDIR\bin\gpgol.dll"
+  ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\bin_64\gpgol.dll"'
+  Delete /REBOOTOK "$INSTDIR\bin_64\gpgol.dll"
 ${EndIf}
   RMDir "$INSTDIR"
 !endif
diff --git a/src/uninst-gtk+.nsi b/src/uninst-gtk+.nsi
index bb83c6d..671a158 100644
--- a/src/uninst-gtk+.nsi
+++ b/src/uninst-gtk+.nsi
@@ -31,13 +31,13 @@ Section "-un.gtk+"
   Call un.SourceDelete
 !else
 
-  Delete /REBOOTOK "$INSTDIR\libgdk-win32-2.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libgtk-win32-2.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgdk-win32-2.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgtk-win32-2.0-0.dll"
 
-  Delete /REBOOTOK "$INSTDIR\libgailutil-18.dll"
-  Delete "$INSTDIR\gtk-query-immodules-2.0.exe"
+  Delete /REBOOTOK "$INSTDIR\bin\libgailutil-18.dll"
+  Delete "$INSTDIR\bin\gtk-query-immodules-2.0.exe"
 
-  Delete "$INSTDIR\gtk-update-icon-cache.exe"
+  Delete "$INSTDIR\bin\gtk-update-icon-cache.exe"
 
   Delete "$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders"
   Delete "$INSTDIR\etc\gtk-2.0\gtk.immodules"
diff --git a/src/uninst-kleopatra.nsi b/src/uninst-kleopatra.nsi
index ff07a80..ad6e8f9 100644
--- a/src/uninst-kleopatra.nsi
+++ b/src/uninst-kleopatra.nsi
@@ -43,12 +43,6 @@ Section "-un.kleopatra"
   Delete "$INSTDIR\bin\libkdecore.dll"
   RMDir "$INSTDIR\bin"
 
-  Delete "$INSTDIR\kleopatra.exe"
-  Delete "$INSTDIR\kwatchgnupg.exe"
-  Delete "$INSTDIR\kgpgconf.exe"
-  Delete "$INSTDIR\kbuildsycoca4.exe"
-  Delete "$INSTDIR\kdebugdialog.exe"
-
   Delete "$INSTDIR\share\kde4\services\kleopatra_signencryptfolders.desktop"
   Delete "$INSTDIR\share\kde4\services\kleopatra_signencryptfiles.desktop"
   Delete "$INSTDIR\share\kde4\services\kleopatra_decryptverifyfolders.desktop"
@@ -204,36 +198,36 @@ Section "-un.kleopatra"
   Delete "$INSTDIR\share\applications\kde4\kleopatra.desktop"
   Delete "$INSTDIR\lib\kde4\kcm_kleopatra.dll"
   Delete "$INSTDIR\lib\kde4\kded_globalaccel.dll"
-  Delete "$INSTDIR\libkleopatraclientgui.dll"
-  Delete "$INSTDIR\libkleopatraclientcore.dll"
-  Delete "$INSTDIR\libkleo.dll"
-  Delete "$INSTDIR\libattica.dll"
-  Delete "$INSTDIR\libdbusmenu-qt.dll"
-  Delete "$INSTDIR\libgcc_s_sjlj-1.dll"
-  Delete "$INSTDIR\libgpgme++.dll"
-  Delete "$INSTDIR\libintl.dll"
-  Delete "$INSTDIR\libkcmutils.dll"
-  Delete "$INSTDIR\libkdeui.dll"
-  Delete "$INSTDIR\libkdewin.dll"
-  Delete "$INSTDIR\libkleo.dll"
-  Delete "$INSTDIR\libkleopatraclientcore.dll"
-  Delete "$INSTDIR\libkleopatraclientgui.dll"
-  Delete "$INSTDIR\libkmime.dll"
-  Delete "$INSTDIR\libqgpgme.dll"
+  Delete "$INSTDIR\bin\libkleopatraclientgui.dll"
+  Delete "$INSTDIR\bin\libkleopatraclientcore.dll"
+  Delete "$INSTDIR\bin\libkleo.dll"
+  Delete "$INSTDIR\bin\libattica.dll"
+  Delete "$INSTDIR\bin\libdbusmenu-qt.dll"
+  Delete "$INSTDIR\bin\libgcc_s_sjlj-1.dll"
+  Delete "$INSTDIR\bin\libgpgme++.dll"
+  Delete "$INSTDIR\bin\libintl.dll"
+  Delete "$INSTDIR\bin\libkcmutils.dll"
+  Delete "$INSTDIR\bin\libkdeui.dll"
+  Delete "$INSTDIR\bin\libkdewin.dll"
+  Delete "$INSTDIR\bin\libkleo.dll"
+  Delete "$INSTDIR\bin\libkleopatraclientcore.dll"
+  Delete "$INSTDIR\bin\libkleopatraclientgui.dll"
+  Delete "$INSTDIR\bin\libkmime.dll"
+  Delete "$INSTDIR\bin\libqgpgme.dll"
 
   # Parts formerly in the kdelibs section
 
-  Delete "$INSTDIR\kded_globalaccel.dll"
-  Delete "$INSTDIR\libkdeui.dll"
-  Delete "$INSTDIR\libkdecore.dll"
-  Delete "$INSTDIR\libkcmutils.dll"
-  Delete "$INSTDIR\libqgpgme.dll"
-  Delete "$INSTDIR\libkmime.dll"
-  Delete "$INSTDIR\libgpgme++.dll"
-  Delete "$INSTDIR\libgpgme++-qt.dll"
-  Delete "$INSTDIR\libgpgme++-glib.dll"
+  Delete "$INSTDIR\bin\kded_globalaccel.dll"
+  Delete "$INSTDIR\bin\libkdeui.dll"
+  Delete "$INSTDIR\bin\libkdecore.dll"
+  Delete "$INSTDIR\bin\libkcmutils.dll"
+  Delete "$INSTDIR\bin\libqgpgme.dll"
+  Delete "$INSTDIR\bin\libkmime.dll"
+  Delete "$INSTDIR\bin\libgpgme++.dll"
+  Delete "$INSTDIR\bin\libgpgme++-qt.dll"
+  Delete "$INSTDIR\bin\libgpgme++-glib.dll"
   # Old (but correct) location, better delete it too.
-  Delete "$INSTDIR\kbuildsycoca4.exe"
+  Delete "$INSTDIR\bin\kbuildsycoca4.exe"
 
   Delete "$INSTDIR\share\locale\all_languages"
 
@@ -345,23 +339,23 @@ Section "-un.kleopatra"
 
   # Files installed by old versions, mainly from the former
   # kdesupport package
-  Delete "$INSTDIR\giflib4.dll"
-  Delete "$INSTDIR\libexpatw.dll"
-  Delete "$INSTDIR\libexslt.dll"
-  Delete "$INSTDIR\libkdewin32.dll"
-  Delete "$INSTDIR\libxml2.dll"
-  Delete "$INSTDIR\libxslt.dll"
-  Delete "$INSTDIR\mingw-pcrecpp.dll"
-  Delete "$INSTDIR\mingwm10.dll"
-  Delete "$INSTDIR\pcre.dll"
-  Delete "$INSTDIR\pcrecpp.dll"
-  Delete "$INSTDIR\pcregrep.exe"
-  Delete "$INSTDIR\pcreposix.dll"
-  Delete "$INSTDIR\update-mime-database.exe"
-  Delete "$INSTDIR\xmlcatalog.exe"
-  Delete "$INSTDIR\xmllint.exe"
-  Delete "$INSTDIR\xsltproc.exe"
-  Delete "$INSTDIR\bin\kcmdwrapper.exe"
+  Delete "$INSTDIR\bin\giflib4.dll"
+  Delete "$INSTDIR\bin\libexpatw.dll"
+  Delete "$INSTDIR\bin\libexslt.dll"
+  Delete "$INSTDIR\bin\libkdewin32.dll"
+  Delete "$INSTDIR\bin\libxml2.dll"
+  Delete "$INSTDIR\bin\libxslt.dll"
+  Delete "$INSTDIR\bin\mingw-pcrecpp.dll"
+  Delete "$INSTDIR\bin\mingwm10.dll"
+  Delete "$INSTDIR\bin\pcre.dll"
+  Delete "$INSTDIR\bin\pcrecpp.dll"
+  Delete "$INSTDIR\bin\pcregrep.exe"
+  Delete "$INSTDIR\bin\pcreposix.dll"
+  Delete "$INSTDIR\bin\update-mime-database.exe"
+  Delete "$INSTDIR\bin\xmlcatalog.exe"
+  Delete "$INSTDIR\bin\xmllint.exe"
+  Delete "$INSTDIR\bin\xsltproc.exe"
+  Delete "$INSTDIR\bin\bin\kcmdwrapper.exe"
   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\desktop_kdelibs.mo"
   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\desktop_kdepim.mo"
   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\desktop_kdepimlibs.mo"
diff --git a/src/uninst-libassuan.nsi b/src/uninst-libassuan.nsi
index aea64e0..ea48649 100644
--- a/src/uninst-libassuan.nsi
+++ b/src/uninst-libassuan.nsi
@@ -31,7 +31,7 @@ Section "-un.libassuan"
   Push "${gpg4win_pkg_libassuan}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libassuan-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libassuan-0.dll"
   Delete "$INSTDIR\lib\libassuan.imp"
   Delete "$INSTDIR\include\assuan.h"
 
diff --git a/src/uninst-libffi.nsi b/src/uninst-libffi.nsi
index 5171e8b..20429c2 100644
--- a/src/uninst-libffi.nsi
+++ b/src/uninst-libffi.nsi
@@ -30,10 +30,10 @@ Section "-un.libffi"
   Call un.SourceDelete
 !else
 
-  Delete /REBOOTOK "$INSTDIR\libffi-6.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libffi-6.dll"
 
 # Also delete any left-over old libffi version.
-  Delete "$INSTDIR\libffi-5.dll"
+  Delete "$INSTDIR\bin\libffi-5.dll"
 
 !endif
 SectionEnd
diff --git a/src/uninst-libgpg-error.nsi b/src/uninst-libgpg-error.nsi
index 55a3993..6f5615c 100644
--- a/src/uninst-libgpg-error.nsi
+++ b/src/uninst-libgpg-error.nsi
@@ -30,14 +30,14 @@ Section "-un.libgpg-error"
   Push "${gpg4win_pkg_libgpg_error}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libgpg-error-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libgpg-error-0.dll"
 
   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libgpg-error.mo"
   Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libgpg-error.mo"
   Delete "$INSTDIR\share\locale\ro\LC_MESSAGES\libgpg-error.mo"
   Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\libgpg-error.mo"
 
-  Delete "$INSTDIR\gpg-error.exe"
+  Delete "$INSTDIR\bin\gpg-error.exe"
   Delete "$INSTDIR\lib\libgpg-error.imp"
   Delete "$INSTDIR\lib\libgpg-assuan.imp"
   Delete "$INSTDIR\include\gpg-error.h"
diff --git a/src/uninst-libiconv.nsi b/src/uninst-libiconv.nsi
index 21b3e80..9cb0455 100644
--- a/src/uninst-libiconv.nsi
+++ b/src/uninst-libiconv.nsi
@@ -30,14 +30,14 @@ Section "-un.libiconv"
   Push "${gpg4win_pkg_libiconv}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\libiconv-2.dll"
-  Delete /REBOOTOK "$INSTDIR\iconv.dll"
-  Delete /REBOOTOK "$INSTDIR\pub\iconv.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libiconv-2.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\iconv.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\pub\iconv.dll"
 
   Delete "$INSTDIR\lib\charset.alias"
 !ifdef DEBUG
-  Delete "$INSTDIR\charset.dll"
-  Delete "$INSTDIR\iconv.exe"
+  Delete "$INSTDIR\bin\charset.dll"
+  Delete "$INSTDIR\bin\iconv.exe"
 !endif
   RMDir "$INSTDIR"
 !endif
diff --git a/src/uninst-libpng.nsi b/src/uninst-libpng.nsi
index 947fdbe..23f1d5e 100644
--- a/src/uninst-libpng.nsi
+++ b/src/uninst-libpng.nsi
@@ -31,11 +31,11 @@ Section "-un.libpng"
   Call un.SourceDelete
 !else
 
-  Delete /REBOOTOK "$INSTDIR\libpng14-14.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libpng14-14.dll"
 
   # Old versions:
-  Delete "$INSTDIR\libpng13.dll"
-  Delete "$INSTDIR\libpng12-0.dll"
+  Delete "$INSTDIR\bin\libpng13.dll"
+  Delete "$INSTDIR\bin\libpng12-0.dll"
 
   RMDir "$INSTDIR"
 !endif
diff --git a/src/uninst-pango.nsi b/src/uninst-pango.nsi
index 416ea79..4658d1f 100644
--- a/src/uninst-pango.nsi
+++ b/src/uninst-pango.nsi
@@ -29,11 +29,11 @@ Section "-un.pango"
   Push "${gpg4win_pkg_pango_src}"
   Call un.SourceDelete
 !else
-  Delete "$INSTDIR\pango-querymodules.exe"
-  Delete /REBOOTOK "$INSTDIR\libpango-1.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libpangoft2-1.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libpangowin32-1.0-0.dll"
-  Delete /REBOOTOK "$INSTDIR\libpangocairo-1.0-0.dll"
+  Delete "$INSTDIR\bin\pango-querymodules.exe"
+  Delete /REBOOTOK "$INSTDIR\bin\libpango-1.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libpangoft2-1.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libpangowin32-1.0-0.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\libpangocairo-1.0-0.dll"
 
 
   Delete "$INSTDIR\etc\pango\pango.modules"
@@ -41,16 +41,16 @@ Section "-un.pango"
   RMDir "$INSTDIR\etc"
 
 # Remove stuff from old Pango versions.
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-arabic-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-basic-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-basic-win32.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-hangul-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-hebrew-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-indic-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-khmer-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-syriac-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-thai-fc.dll"
-  Delete "$INSTDIR\lib\pango\1.4.0\modules\pango-tibetan-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-arabic-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-basic-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-basic-win32.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-hangul-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-hebrew-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-indic-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-khmer-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-syriac-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-thai-fc.dll"
+  Delete "$INSTDIR\bin\lib\pango\1.4.0\modules\pango-tibetan-fc.dll"
   RMDir "$INSTDIR\lib\pango\1.4.0\modules"
   RMDir "$INSTDIR\lib\pango\1.4.0"
   RMDir "$INSTDIR\lib\pango"
diff --git a/src/uninst-paperkey.nsi b/src/uninst-paperkey.nsi
index ce54698..ae711e2 100644
--- a/src/uninst-paperkey.nsi
+++ b/src/uninst-paperkey.nsi
@@ -28,7 +28,7 @@ Section "-un.paperkey"
   Push "${gpg4win_pkg_paperkey}"
   Call un.SourceDelete
 !else
-  Delete "$INSTDIR\paperkey.exe"
+  Delete "$INSTDIR\bin\paperkey.exe"
   Delete "$INSTDIR\share\gnupg\paperkey.man"
   RMDir "$INSTDIR\share\gnupg"
 !endif
diff --git a/src/uninst-pinentry.nsi b/src/uninst-pinentry.nsi
index 785b3af..7b3f4a0 100644
--- a/src/uninst-pinentry.nsi
+++ b/src/uninst-pinentry.nsi
@@ -31,10 +31,10 @@ Section "-un.pinentry"
   Push "${gpg4win_pkg_pinentry}"
   Call un.SourceDelete
 !else
-  Delete "$INSTDIR\pinentry-w32.exe"
-  Delete "$INSTDIR\pinentry-gtk-2.exe"
-  Delete "$INSTDIR\pinentry-qt.exe"
-  Delete "$INSTDIR\pinentry.exe"
+  Delete "$INSTDIR\bin\pinentry-w32.exe"
+  Delete "$INSTDIR\bin\pinentry-gtk-2.exe"
+  Delete "$INSTDIR\bin\pinentry-qt.exe"
+  Delete "$INSTDIR\bin\pinentry.exe"
 
   RMDir "$INSTDIR"
 !endif
diff --git a/src/uninst-qtbase.nsi b/src/uninst-qtbase.nsi
index 3228e37..326e882 100644
--- a/src/uninst-qtbase.nsi
+++ b/src/uninst-qtbase.nsi
@@ -31,9 +31,9 @@ Section "-un.qtbase"
   Push "${gpg4win_pkg_qtbase_src}"
   Call un.SourceDelete
 !else
-  Delete "$INSTDIR\Qt5Core.dll"
-  Delete "$INSTDIR\Qt5Gui.dll"
-  Delete "$INSTDIR\Qt5Widgets.dll"
+  Delete "$INSTDIR\bin\Qt5Core.dll"
+  Delete "$INSTDIR\bin\Qt5Gui.dll"
+  Delete "$INSTDIR\bin\Qt5Widgets.dll"
 
   Delete "$INSTDIR\platforms\qwindows.dll"
 
diff --git a/src/uninst-w32pth.nsi b/src/uninst-w32pth.nsi
index 570cc60..13f6228 100644
--- a/src/uninst-w32pth.nsi
+++ b/src/uninst-w32pth.nsi
@@ -31,7 +31,7 @@ Section "-un.w32pth"
   Push "${gpg4win_pkg_w32pth}"
   Call un.SourceDelete
 !else
-  Delete "$INSTDIR\libw32pth-0.dll"
+  Delete "$INSTDIR\bin\libw32pth-0.dll"
   RMDir "$INSTDIR"
 !endif
 SectionEnd
diff --git a/src/uninst-zlib.nsi b/src/uninst-zlib.nsi
index b348619..36dfad9 100644
--- a/src/uninst-zlib.nsi
+++ b/src/uninst-zlib.nsi
@@ -30,7 +30,7 @@ Section "-un.zlib"
   Push "${gpg4win_pkg_zlib}"
   Call un.SourceDelete
 !else
-  Delete /REBOOTOK "$INSTDIR\zlib1.dll"
+  Delete /REBOOTOK "$INSTDIR\bin\zlib1.dll"
 
 !endif
 SectionEnd

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

Summary of changes:
 src/Makefile.am                |  27 +--
 src/gpgwrap.c                  | 189 -------------------
 src/inst-atk.nsi               |   1 +
 src/inst-cairo.nsi             |   1 +
 src/inst-dbus.nsi              |   2 -
 src/inst-expat.nsi             |   1 +
 src/inst-fontconfig.nsi        |   1 +
 src/inst-freetype.nsi          |   1 +
 src/inst-gdk-pixbuf.nsi        |   2 +
 src/inst-gettext.nsi           |   1 +
 src/inst-glib.nsi              |   1 +
 src/inst-gpa.nsi               |   4 +-
 src/inst-gpg4win.nsi           |   2 +-
 src/inst-gpgex.nsi             |   9 +-
 src/inst-gpgme.nsi             |   1 +
 src/inst-gpgol.nsi             |   7 +-
 src/inst-gtk+.nsi              |   1 +
 src/inst-kleopatra.nsi         |   7 -
 src/inst-libassuan.nsi         |   1 +
 src/inst-libffi.nsi            |   1 +
 src/inst-libgpg-error.nsi      |   3 +-
 src/inst-libiconv.nsi          |  11 +-
 src/inst-libpng.nsi            |   1 +
 src/inst-pango.nsi             |   1 +
 src/inst-paperkey.nsi          |   1 +
 src/inst-pinentry.nsi          |   1 +
 src/inst-qtbase.nsi            |   5 +-
 src/inst-sections.nsi          |   4 +-
 src/inst-w32pth.nsi            |   1 +
 src/inst-zlib.nsi              |   1 +
 src/kleowrap.c                 | 418 -----------------------------------------
 src/uninst-atk.nsi             |   2 +-
 src/uninst-cairo.nsi           |   6 +-
 src/uninst-claws-mail-cmds.nsi |  48 ++---
 src/uninst-dbus.nsi            |  16 +-
 src/uninst-expat.nsi           |   2 +-
 src/uninst-fontconfig.nsi      |   2 +-
 src/uninst-freetype.nsi        |   2 +-
 src/uninst-gdk-pixbuf.nsi      |   6 +-
 src/uninst-gettext.nsi         |  12 +-
 src/uninst-glib.nsi            |  36 ++--
 src/uninst-gpa.nsi             |   3 +-
 src/uninst-gpg4win.nsi         |  16 +-
 src/uninst-gpgex.nsi           |   8 +-
 src/uninst-gpgme.nsi           |   8 +-
 src/uninst-gpgol.nsi           |   8 +-
 src/uninst-gtk+.nsi            |  10 +-
 src/uninst-kleopatra.nsi       |  92 +++++----
 src/uninst-libassuan.nsi       |   2 +-
 src/uninst-libffi.nsi          |   4 +-
 src/uninst-libgpg-error.nsi    |   4 +-
 src/uninst-libiconv.nsi        |  10 +-
 src/uninst-libpng.nsi          |   6 +-
 src/uninst-pango.nsi           |  30 +--
 src/uninst-paperkey.nsi        |   2 +-
 src/uninst-pinentry.nsi        |   8 +-
 src/uninst-qtbase.nsi          |   6 +-
 src/uninst-w32pth.nsi          |   2 +-
 src/uninst-zlib.nsi            |   2 +-
 59 files changed, 217 insertions(+), 843 deletions(-)
 delete mode 100644 src/gpgwrap.c
 delete mode 100644 src/kleowrap.c


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list