From 5e43957be94fd21d000f4e08060a1af968f005a0 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Fri, 22 Apr 2016 13:12:22 +0000 Subject: Windows: configuring for exernal perl if found and recent git-svn-id: svn://tug.org/texlive/trunk@40677 c570f23f-e606-0410-a88d-b1316a301751 --- Master/bin/win32/runscript.tlu | 16 ++++++++++++++-- Master/install-tl | 20 ++++++++++++++++++++ Master/install-tl-windows.bat | 6 ++++++ 3 files changed, 40 insertions(+), 2 deletions(-) (limited to 'Master') diff --git a/Master/bin/win32/runscript.tlu b/Master/bin/win32/runscript.tlu index 8f705c87902..b55eac1876a 100755 --- a/Master/bin/win32/runscript.tlu +++ b/Master/bin/win32/runscript.tlu @@ -471,7 +471,15 @@ local scripts4tlperl = { local try_extern_perl = (kpse.var_value('TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL') == '1') and not (guimode or is_restricted_progname or scripts4tlperl[progname]) local PERLEXE = try_extern_perl and search_path('perl.exe', PATH) -if not PERLEXE then +local extperl_warn +if not PERLEXE then + if try_extern_perl then extperl_warn = [[ +External Perl missing or outdated. Please install a recent Perl, or configure +TeX Live to always use the builtin Perl: + tlmgr conf texmf TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL 0 +Meanwhile, continuing with built-in Perl... +]] + end -- if try_extern_perl PERLEXE = TEXDIR..'/tlpkg/tlperl/bin/perl.exe' os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') PATH = prepend_path(PATH, TEXDIR..'/tlpkg/tlperl/bin') @@ -662,6 +670,10 @@ end if ARGV then table.insert(ARGV, argline) -- pass through original arguments + if string.find (table.concat(ARGV, ' '), 'perl.exe') and extperl_warn then + + io.stderr:write(extperl_warn) + end local ret = assert(os.spawn(ARGV)) if ret ~= 0 then local dbginfo = debug.getinfo(1) @@ -687,6 +699,6 @@ if not success then end -- about RUNSCRIPT_ERROR_MESSAGE environment variable: --- it stores an error message that is catched and displayed +-- it stores an error message that is caught and displayed -- in a message box on the C side at process exit -- (currently used only by gui mode stubs) diff --git a/Master/install-tl b/Master/install-tl index 85b7a9f8df2..b9b3a7cbc78 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1153,6 +1153,26 @@ shell_escape = 0 EOF ; } + + # external perl for third-party scripts? + # the wrapper batchfile has set the environment variable extperl + # to its version if available and 0 otherwise. + if (win32) { + my $use_ext = 0; + if (!$vars{'portable'} && + defined $ENV{'extperl'} && $ENV{'extperl'} =~ /^(\d+\.\d+)/) { + $use_ext = 1 if $1 >= 5.14; + } + print TMF <