[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.1.1-48-g4082b91
by Werner Koch
cvs at cvs.gnupg.org
Mon Aug 12 13:16:02 CEST 2013
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, master has been updated
via 4082b910cd831789ad3cc88fbf436a4491ae5352 (commit)
from 141f0d8ce97be4af6136ca3059ebea63fe4d353e (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 4082b910cd831789ad3cc88fbf436a4491ae5352
Author: Werner Koch <wk at gnupg.org>
Date: Mon Aug 12 12:47:52 2013 +0200
mkportable: Install pinentry depending on the install type.
* src/mkportable.c (copy_file): Add arg NAME2 and change all callers.
(copy_all_files): Install pinentry.exe.
diff --git a/src/mkportable-full.h b/src/mkportable-full.h
index ab97182..9825f6e 100644
--- a/src/mkportable-full.h
+++ b/src/mkportable-full.h
@@ -162,7 +162,6 @@ const char * const full_files[] =
"pinentry-gtk-2.exe",
"pinentry-qt4.exe",
"pinentry-w32.exe",
- "pinentry.exe",
"plugins/imageformats/qgif4.dll",
"plugins/imageformats/qico4.dll",
"plugins/imageformats/qjpeg4.dll",
diff --git a/src/mkportable-light.h b/src/mkportable-light.h
index 61ae36c..7af065f 100644
--- a/src/mkportable-light.h
+++ b/src/mkportable-light.h
@@ -120,7 +120,6 @@ const char * const light_files[] =
"paperkey.exe",
"pinentry-gtk-2.exe",
"pinentry-w32.exe",
- "pinentry.exe",
"pthreadGC2.dll",
"pub/gpa.exe",
"pub/gpg-connect-agent.exe",
diff --git a/src/mkportable-vanilla.h b/src/mkportable-vanilla.h
index 3e2a16f..a2cddbc 100644
--- a/src/mkportable-vanilla.h
+++ b/src/mkportable-vanilla.h
@@ -35,7 +35,6 @@ const char * const vanilla_files[] =
"md5sum.exe",
"paperkey.exe",
"pinentry-w32.exe",
- "pinentry.exe",
"pub/gpg-connect-agent.exe",
"pub/gpg.exe",
"pub/gpg2.exe",
diff --git a/src/mkportable.c b/src/mkportable.c
index b37bd46..d30d4d5 100644
--- a/src/mkportable.c
+++ b/src/mkportable.c
@@ -390,10 +390,11 @@ make_dirs (const char *name)
/****************
- * Copy the option file skeleton to the given directory.
+ * Copy the option file skeleton to the given directory. If NAME2 is
+ * not NULL it is used as the destination name.
*/
static int
-copy_file (const char *name)
+copy_file (const char *name, const char *name2)
{
char *srcname, *dstname;
FILE *srcfp, *dstfp;
@@ -401,10 +402,15 @@ copy_file (const char *name)
char buffer[4096];
if (verbose > 1)
- inf ("copying '%s'", name);
+ {
+ if (name2)
+ inf ("copying '%s' as '%s'", name, name2);
+ else
+ inf ("copying '%s'", name);
+ }
srcname = make_sourcename (name);
- dstname = make_targetname (name);
+ dstname = make_targetname (name2? name2:name);
srcfp = fopen (srcname, "rb");
if (!srcfp)
@@ -543,7 +549,7 @@ wildcard_copy_file (const char *name)
strcat (buffer, tail);
}
if (!access (buffer, F_OK))
- if (copy_file (buffer + srcpos))
+ if (copy_file (buffer + srcpos, NULL))
{
res = 1;
goto leave;
@@ -580,9 +586,20 @@ copy_all_files (void)
if (wildcard_copy_file (name))
return 1;
}
- else if (copy_file (name))
+ else if (copy_file (name, NULL))
return 1;
}
+
+ /* Pinentry is special. Depending on the installation type we need
+ to install a copy under the name pinentry.exe. */
+ switch (install_type)
+ {
+ case iFULL: copy_file ("pinentry-qt4.exe", "pinentry.exe"); break;
+ case iLIGHT: copy_file ("pinentry-gtk-2.exe", "pinentry.exe"); break;
+ case iVANILLA: copy_file ("pinentry-w32.exe", "pinentry.exe"); break;
+ }
+
+
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
src/mkportable-full.h | 1 -
src/mkportable-light.h | 1 -
src/mkportable-vanilla.h | 1 -
src/mkportable.c | 29 +++++++++++++++++++++++------
4 files changed, 23 insertions(+), 9 deletions(-)
hooks/post-receive
--
GnuPG for Windows
http://git.gnupg.org
More information about the Gpg4win-commits
mailing list