summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-04-14 13:42:00 +0000
committerNorbert Preining <preining@logic.at>2016-04-14 13:42:00 +0000
commit3afa0dc8b34a20b7014c4c1c517f078c715e2d6b (patch)
tree0636cdde80aaad4a136077a57fcde546a6199873 /Master/tlpkg/TeXLive/TLUtils.pm
parent683d334a8b977edac65c501ea577a4e77ca26749 (diff)
allow for Windows users to setup gpg
git-svn-id: svn://tug.org/texlive/trunk@40505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index fc05caa5c70..6d7218b2870 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2255,9 +2255,11 @@ sub setup_unix_one {
my ($p, $def, $arg, $donotwarn) = @_;
our $tmp;
my $test_fallback = 0;
+ ddebug("trying to set up $p, default $def, arg $arg\n");
if (-r $def) {
my $ready = 0;
if (-x $def) {
+ ddebug("default $def is readable and executable!\n");
# checking only for the executable bit is not enough, we have
# to check for actualy "executability" since a "noexec" mount
# option may interfere, which is not taken into account by
@@ -3636,8 +3638,16 @@ Returns 1/0 on success/failure.
sub setup_gpg {
my $master = shift;
- # first search for a gpg binary
- return 0 if (!setup_unix_one( 'gpg' , '/no/such/path', '--version', 1));
+ if ($^O =~ /^MSWin(32|64)$/i) {
+ $::progs{'gpg'} = conv_to_w32_path("$master/tlpkg/installer/gpg/gpg.exe");
+ my $ret = system("$::progs{'gpg'} --version >nul 2>&1"); # on windows
+ if ($ret != 0) {
+ return 0;
+ }
+ } else {
+ # first search for a gpg binary
+ return 0 if (!setup_unix_one( 'gpg' , '/no/such/path', '--version', 1));
+ }
# ok, we found one
# Set up the gpg invocation:
$::gpg = "$::progs{'gpg'} ";