From 182f384a817a982e1f078a496b68cae8edacb777 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 18 Apr 2016 21:56:02 +0000 Subject: just check for ^MSWin, not 32|64; who knows what the future will bring git-svn-id: svn://tug.org/texlive/trunk@40600 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 2 +- Master/texmf-dist/scripts/texlive/tlmgr.pl | 4 ++-- Master/tlpkg/TeXLive/TLConfig.pm | 2 +- Master/tlpkg/TeXLive/TLPaper.pm | 5 ++--- Master/tlpkg/TeXLive/TLUtils.pm | 8 ++++---- Master/tlpkg/TeXLive/TLWinGoo.pm | 11 +++-------- Master/tlpkg/TeXLive/trans.pl | 4 ++-- 7 files changed, 15 insertions(+), 21 deletions(-) (limited to 'Master') diff --git a/Master/install-tl b/Master/install-tl index 85fe208f8cf..9a1244898bf 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -30,7 +30,7 @@ BEGIN { $^W = 1; my $Master; my $me = $0; - $me =~ s!\\!/!g if $^O =~ /^MSWin(32|64)$/i; + $me =~ s!\\!/!g if $^O =~ /^MSWin/i; if ($me =~ m!/!) { ($Master = $me) =~ s!(.*)/[^/]*$!$1!; } else { diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index af0bdd3dd12..6861341ba1a 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -4323,7 +4323,7 @@ sub action_platform { my @extra_w32_packs = qw/tlperl.win32 tlgs.win32 tlpsv.win32 collection-wintools dviout.win32 wintools.win32/; - if ($^O=~/^MSWin(32|64)$/i) { + if ($^O =~ /^MSWin/i) { warn("action `platform' not supported on Windows\n"); return ($F_WARNING); } @@ -4637,7 +4637,7 @@ sub action_gui { $tkmissing = 1; } if ($tkmissing) { - if ($^O=~/^MSWin(32|64)$/i) { + if ($^O =~ /^MSWin/i) { # that should not happen, we are shipping Tk!! require Win32; my $msg = "Cannot load Tk, that should not happen as we ship it!\nHow did you start tlmgrgui??\n(Error message: $@)\n"; diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm index ee9c0e397e2..9d36bac5d63 100644 --- a/Master/tlpkg/TeXLive/TLConfig.pm +++ b/Master/tlpkg/TeXLive/TLConfig.pm @@ -108,7 +108,7 @@ our $RelocPrefix = "RELOC"; our @CriticalPackagesList = qw/texlive.infra/; our $CriticalPackagesRegexp = '^(texlive\.infra)'; -if ($^O =~ /^MSWin(32|64)$/i) { +if ($^O =~ /^MSWin/i) { push (@CriticalPackagesList, "tlperl.win32"); $CriticalPackagesRegexp = '^(texlive\.infra|tlperl\.win32$)'; } diff --git a/Master/tlpkg/TeXLive/TLPaper.pm b/Master/tlpkg/TeXLive/TLPaper.pm index e4e92e74cfd..b1074ae96e2 100644 --- a/Master/tlpkg/TeXLive/TLPaper.pm +++ b/Master/tlpkg/TeXLive/TLPaper.pm @@ -1,13 +1,12 @@ -# $Id: TLPaper.pm 39006 2015-12-03 18:53:45Z karl $ +# $Id$ # TeXLive::TLPaper.pm - query/modify paper sizes for our various programs # Copyright 2008-2016 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. -# package TeXLive::TLPaper; -my $svnrev = '$Revision: 39006 $'; +my $svnrev = '$Revision$'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index eec6b91f686..bfdb55d1087 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -222,7 +222,7 @@ $::opt_verbosity = 0; # see process_logging_options =item C -If C<$^O=~/MSWin(32|64)$/i> is true we know that we're on +If C<$^O =~ /MSWin/i> is true we know that we're on Windows and we set the global variable C<$::_platform_> to C. Otherwise we call C with the output of C as argument. @@ -2207,7 +2207,7 @@ sub setup_programs { $::progs{'xz'} = "xz"; $::progs{'tar'} = "tar"; - if ($^O =~ /^MSWin(32|64)$/i) { + if ($^O =~ /^MSWin/i) { $::progs{'wget'} = conv_to_w32_path("$bindir/wget/wget.exe"); $::progs{'tar'} = conv_to_w32_path("$bindir/tar.exe"); $::progs{'xzdec'} = conv_to_w32_path("$bindir/xz/xzdec.exe"); @@ -3659,7 +3659,7 @@ sub test_one_gpg { my $prg = shift; my $cmdline; debug("Testing for gpg in $prg\n"); - if ($^O =~ /^MSWin(32|64)$/i) { + if ($^O =~ /^MSWin/i) { # Perl on Windows somehow does not allow calling a program # without a full path - at least a call to "gpg" tells me # that "c:/Users/norbert/gpg" is not recognized ... @@ -3697,7 +3697,7 @@ sub setup_gpg { $prg = test_one_gpg('gpg2'); $found = 1 if ($prg); } - if (!$found && $^O =~ /^MSWin(32|64)$/i) { + if (!$found && $^O =~ /^MSWin/i) { # test on windows also a shipped version from texlive.gpg.win32 if (-r "$master/tlpkg/installer/gpg/gpg.exe") { $prg = "$master/tlpkg/installer/gpg/gpg.exe"; diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index 3079e7724af..c16e4329a9d 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -1,6 +1,6 @@ # $Id$ # TeXLive::TLWinGoo.pm - Windows nastiness -# Copyright 2008-2014, 2016 Siep Kroonenberg, Norbert Preining +# Copyright 2008-2016 Siep Kroonenberg, Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -128,7 +128,7 @@ BEGIN { &is_a_texdir &tex_dirs_on_path ); - if ($^O=~/^MSWin(32|64)$/i) { + if ($^O=~/^MSWin/i) { require Win32; require Win32::API; require Win32API::File; @@ -160,7 +160,7 @@ sub reg_debug { } } -my $is_win = $^O=~/^MSWin(32|64)$/i; +my $is_win = ($^O =~ /^MSWin/i); # Win32: import some wrappers for API functions # failed to get Win32::API::More to work with raw API functions; @@ -483,11 +483,6 @@ to system or user PATH variable in the registry (depending on $mode). # short path names should be unique -#my $shortfu; -#if ($^O=~/^MSWin(32|64)$/i) { -# $shortfu = new Win32::API('kernel32', 'GetShortPathName', 'PPN', 'N'); -#} - sub short_name { my ($fname) = @_; return $fname unless $is_win; diff --git a/Master/tlpkg/TeXLive/trans.pl b/Master/tlpkg/TeXLive/trans.pl index de98d258e18..09991f53a52 100644 --- a/Master/tlpkg/TeXLive/trans.pl +++ b/Master/tlpkg/TeXLive/trans.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # $Id$ -# Copyright 2009-2012 Norbert Preining +# Copyright 2009-2016 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # @@ -30,7 +30,7 @@ if (defined($::opt_lang)) { $::lang = "zh_CN"; } } else { - if ($^O =~ /^MSWin(32|64)$/i) { + if ($^O =~ /^MSWin/i) { # trying to deduce automatically the country code my ($lang, $area) = TeXLive::TLWinGoo::reg_country(); if ($lang) { -- cgit v1.2.3