diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 90 | ||||
-rwxr-xr-x | Master/install-tl-windows.bat | 6 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/fmtutil.pl | 34 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 67 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgrgui.pl | 18 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/uninstall-windows.pl (renamed from Master/texmf-dist/scripts/texlive/uninstall-win32.pl) | 4 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/updmap.pl | 16 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/tlshell/tlshell.tcl | 19 |
8 files changed, 125 insertions, 129 deletions
diff --git a/Master/install-tl b/Master/install-tl index 5f0f24be645..53c9b9f7515 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -145,7 +145,7 @@ use Pod::Usage; use POSIX (); use TeXLive::TLUtils qw(platform platform_desc sort_archs - which getenv win32 unix info log debug tlwarn ddebug tldie + which getenv wndws unix info log debug tlwarn ddebug tldie member process_logging_options rmtree wsystem mkdirhier make_var_skeleton make_local_skeleton install_package copy install_packages dirname setup_programs native_slashify forward_slashify); @@ -163,7 +163,7 @@ eval { debug("Encode::Locale is loaded.\n"); }; if ($@) { - if (win32) { + if (wndws()) { die ("For Windows, Encode::Locale is required.\n"); } @@ -177,7 +177,7 @@ binmode (STDIN, ':encoding(console_in)'); binmode (STDOUT, ':encoding(console_out)'); binmode (STDERR, ':encoding(console_out)'); -if (win32) { +if (wndws()) { require TeXLive::TLWinGoo; TeXLive::TLWinGoo->import( qw( &admin @@ -349,7 +349,7 @@ if ((defined $ARGV[0]) && $ARGV[0] eq "-from_ext_gui") { select(STDOUT); $| = 1; # windows: suppress console windows when invoking other programs - Win32::SetChildShowWindow(0) if win32(); + Win32::SetChildShowWindow(0) if wndws(); } # If we find a file installation.profile we ask the user whether we should @@ -433,7 +433,7 @@ if ($opt_help) { # theoretically we could make a subroutine with all the same # painful checks as we do in tlmgr, but let's not bother until people ask. my @noperldoc = (); - if (win32() || $ENV{"NOPERLDOC"}) { + if (wndws() || $ENV{"NOPERLDOC"}) { @noperldoc = ("-noperldoc", "1"); } @@ -473,7 +473,7 @@ if ($opt_version) { print "\nTLPOBJ: " . TeXLive::TLPOBJ->module_revision(); print "\nTLTREE: " . TeXLive::TLTREE->module_revision(); print "\nTLUtils: " . TeXLive::TLUtils->module_revision(); - print "\nTLWinGoo: " . TeXLive::TLWinGoo->module_revision() if win32(); + print "\nTLWinGoo: " . TeXLive::TLWinGoo->module_revision() if wndws(); print "\n"; } exit 0; @@ -526,7 +526,7 @@ if ($opt_profile) { # not allowed if in_place } } -if ($opt_nonadmin and win32()) { +if ($opt_nonadmin and wndws()) { non_admin(); } @@ -928,7 +928,7 @@ sub final_remote_init { } $opt_scheme = "" if $opt_in_place; $vars{'instopt_portable'} = $opt_portable; - $vars{'instopt_adjustpath'} = 1 if win32(); + $vars{'instopt_adjustpath'} = 1 if wndws(); log("Installer revision: $::installerrevision\n"); log("Database revision: " . $tlpdb->config_revision . "\n"); @@ -1007,7 +1007,7 @@ sub update_default_src_doc_install { sub do_installation { - if (win32()) { + if (wndws()) { non_admin() if !$vars{'tlpdbopt_w32_multi_user'}; } if ($vars{'instopt_portable'}) { @@ -1030,7 +1030,7 @@ sub do_installation { # making the root read-only automatically locks everything below it. # do TEXDIR now, before it loses its final slash mkdirhier "$vars{'TEXDIR'}"; - if (win32()) { + if (wndws()) { TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXDIR'}); } # check for free disk space @@ -1056,7 +1056,7 @@ sub do_installation { my $oldlocal = -d $vars{'TEXMFLOCAL'}; make_local_skeleton "$vars{'TEXMFLOCAL'}"; mkdirhier "$vars{'TEXMFSYSCONFIG'}"; - if (win32()) { + if (wndws()) { TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXMFSYSVAR'}); TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXMFLOCAL'}) unless $oldlocal; TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXMFSYSCONFIG'}); @@ -1224,16 +1224,16 @@ operations might be disturbed.\n\n"; # Step 2: Setup the PATH, switch to the new Perl - my $pathsep = (win32)? ';' : ':'; + my $pathsep = (wndws())? ';' : ':'; my $plat_bindir = "$TEXDIR/bin/$vars{'this_platform'}"; my $perl_bindir = "$TEXDIR/tlpkg/tlperl/bin"; my $perl_libdir = "$TEXDIR/tlpkg/tlperl/lib"; - my $progext = (win32)? '.exe' : ''; + my $progext = (wndws())? '.exe' : ''; debug("Prepending $plat_bindir to PATH\n"); $ENV{'PATH'} = $plat_bindir . $pathsep . $ENV{'PATH'}; - if (win32) { + if (wndws()) { debug("Prepending $perl_bindir to PATH\n"); $ENV{'PATH'} = "$perl_bindir" . "$pathsep" . "$ENV{'PATH'}"; $ENV{'PATH'} =~ s!/!\\!g; @@ -1244,7 +1244,7 @@ operations might be disturbed.\n\n"; debug(" $dir\n"); } debug("\n"); - if (win32) { + if (wndws()) { $ENV{'PERL5LIB'} = $perl_libdir; } @@ -1254,7 +1254,7 @@ operations might be disturbed.\n\n"; my $usedtlpdb = $opt_in_place ? $tlpdb : $localtlpdb; - if (win32()) { + if (wndws()) { debug("Actual environment:\n" . `set` ."\n\n"); debug("Effective TEXMFCNF: " . `kpsewhich -expand-path=\$TEXMFCNF` ."\n"); } @@ -1267,7 +1267,7 @@ operations might be disturbed.\n\n"; } # we have to generate the various config file. That could be done with - # texconfig generate * but Win32 does not have texconfig. But we have + # texconfig generate * but Windows does not have texconfig. But we have # $localtlpdb and this is simple code, so do it directly, i.e., duplicate # the code from the various generate-*.pl scripts @@ -1323,7 +1323,7 @@ operations might be disturbed.\n\n"; } # option settings in launcher.ini - if (win32() && !$vars{'instopt_portable'}) { + if (wndws() && !$vars{'instopt_portable'}) { if ($vars{'tlpdbopt_file_assocs'} != 1 || !$vars{'instopt_adjustpath'}) { # create higher priority tlaunch.ini with adjusted settings # whether or not launcher mode (desktop integration 2) @@ -1335,7 +1335,7 @@ operations might be disturbed.\n\n"; # now rerun mktexlsr for updmap-sys and tlmgr paper letter updates. wsystem("re-running", "mktexlsr", $TEXMFSYSVAR, $TEXMFSYSCONFIG) && exit(1); - if (win32() and !$vars{'instopt_portable'} and !$opt_in_place) { + if (wndws() and !$vars{'instopt_portable'} and !$opt_in_place) { if ($vars{'tlpdbopt_desktop_integration'} != 2) { create_uninstaller($vars{'TEXDIR'}); } else { @@ -1351,6 +1351,7 @@ operations might be disturbed.\n\n"; && !exists $ENV{"TEXLIVE_INSTALL_NO_CONTEXT_CACHE"}) { info("setting up ConTeXt cache: "); $errcount += run_postinst_cmd("mtxrun --generate"); + $errcount += run_postinst_cmd("context --luatex --generate"); } # all formats option @@ -1413,7 +1414,7 @@ sub do_tlpdb_postactions { } } # windows: alert the system about changed file associations - if (win32) { TeXLive::TLWinGoo::update_assocs(); } + if (wndws()) { TeXLive::TLWinGoo::update_assocs(); } info ("finished with package-specific postactions\n"); return $ret; } # do_tlpdb_postactions @@ -1458,8 +1459,8 @@ sub rewrite_tlaunch_ini { sub do_path_adjustments { my $ret = 0; info ("running path adjustment actions\n"); - if (win32()) { - TeXLive::TLUtils::w32_add_to_path($vars{'TEXDIR'}.'/bin/win32', + if (wndws()) { + TeXLive::TLUtils::w32_add_to_path($vars{'TEXDIR'} . '/bin/windows', $vars{'tlpdbopt_w32_multi_user'}); broadcast_env(); } else { @@ -1518,7 +1519,7 @@ sub do_texmf_cnf { push @changedtmf, "TEXMFHOME = $vars{'TEXMFHOME'}\n"; } } elsif ($line =~ m/^OSFONTDIR/) { - if (win32()) { + if (wndws()) { push @changedtmf, "OSFONTDIR = \$SystemRoot/fonts//;\$LOCALAPPDATA/Microsoft/Windows/Fonts//\n"; } } @@ -1571,7 +1572,7 @@ 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) { + if (wndws()) { my $use_ext = 0; if (!$vars{'instopt_portable'} && defined $ENV{'extperl'} && $ENV{'extperl'} =~ /^(\d+\.\d+)/) { @@ -1771,7 +1772,7 @@ sub set_texlive_default_dirs { set_var_from_alternatives("TEX_PREFIX", \$tex_prefix, ($opt_in_place ? abs_path($::installerdir) : undef), $tlprefixenv, - (win32() ? getenv('SystemDrive') . '/texlive' : '/usr/local/texlive')); + (wndws() ? getenv('SystemDrive') . '/texlive' : '/usr/local/texlive')); # set_var_from_alternatives("TEXDIR", \$vars{'TEXDIR'}, $opt_texdir, @@ -1865,15 +1866,14 @@ sub calc_depends { } } - # if programs for arch=win32 are installed we also have to install - # tlperl.win32 which provides the "hidden" perl that will be used + # if programs for arch=windows are installed we also have to install + # tlperl.windows which provides the "hidden" perl that will be used # to run all the perl scripts. - # Furthermore we install tlgs.win32 and tlpsv.win32, too - if (grep(/^win32$/,@archs)) { - $install{"tlperl.win32"} = 1; - $install{"tlgs.win32"} = 1; + # Furthermore we install tlgs.windows + if (grep(/^windows$/,@archs)) { + $install{"tlperl.windows"} = 1; + $install{"tlgs.windows"} = 1; # tlpsv is gone - # $install{"tlpsv.win32"} = 1; } # loop over all the packages until it is getting stable @@ -1901,10 +1901,10 @@ sub calc_depends { foreach $a (@archs) { $install{"$foo.$a"} = 1 if defined($tlpdb->get_package("$foo.$a")); } - } elsif ($p_dep =~ m/^(.*)\.win32$/) { - # a win32 package should *only* be installed if we are installing - # the win32 arch - if (grep(/^win32$/,@archs)) { + } elsif ($p_dep =~ m/^(.*)\.windows$/) { + # a windows package should *only* be installed if we are installing + # the windows arch + if (grep(/^windows$/,@archs)) { $install{$p_dep} = 1; } } else { @@ -1999,7 +1999,7 @@ END_EXPLICIT_MIRROR $vars{"tlpdbopt_$o"} = $tlpdb->option($o) if (!defined($profiledata{"tlpdbopt_$o"})); } - if (win32()) { + if (wndws()) { # below, we really mean (start) menu integration. # 2016: always menu shortcuts, never desktop shortcuts, whatever the setting # 2017: new option value 2: launcher instead of menu. @@ -2078,7 +2078,7 @@ sub initialize_collections { ++$vars{'n_collections_selected'}; } } - if ($vars{"binary_win32"}) { + if ($vars{"binary_windows"}) { $vars{"collection-wintools"} = 1; ++$vars{'n_collections_selected'}; } @@ -2372,7 +2372,7 @@ sub do_install_packages { tlwarn("Or you can restart by running the installer with:\n"); my $repostr = ($opt_location ? " --repository $location" : ""); my $args = "--profile $profile_name [YOUR-EXTRA-ARGS]"; - if (win32()) { + if (wndws()) { tlwarn(" install-tl-windows.bat$repostr $args\n"); } else { tlwarn(" install-tl$repostr $args\n"); @@ -2542,11 +2542,11 @@ sub import_settings_from_old_tlpdb { = $previoustlpdb->option_pkg("00texlive.installation", "install_srcfiles"); $vars{'tlpdbopt_create_formats'} = $previoustlpdb->option_pkg("00texlive.installation", "create_formats"); - $vars{'tlpdbopt_desktop_integration'} = 1 if win32(); + $vars{'tlpdbopt_desktop_integration'} = 1 if wndws(); $vars{'instopt_adjustpath'} = $previoustlpdb->option_pkg("00texlive.installation", "path"); $vars{'instopt_adjustpath'} = 0 if !defined($vars{'instopt_adjustpath'}); - $vars{'instopt_adjustpath'} = 1 if win32(); + $vars{'instopt_adjustpath'} = 1 if wndws(); $vars{'tlpdbopt_sys_bin'} = $previoustlpdb->option_pkg("00texlive.installation", "sys_bin"); $vars{'tlpdbopt_sys_man'} @@ -2569,7 +2569,7 @@ sub import_settings_from_old_tlpdb { # # try to import paper settings my $xdvi_paper; - if (!win32()) { + if (!wndws()) { $xdvi_paper = TeXLive::TLPaper::get_paper("xdvi"); } my $pdftex_paper = TeXLive::TLPaper::get_paper("pdftex"); @@ -2643,8 +2643,8 @@ sub select_scheme { # we have first set all collection-* keys to zero and than # set to 1 only those which are required by the scheme # since now scheme asks for collection-wintools we set its vars value - # to 1 in case we are installing win32 binaries - if ($vars{"binary_win32"}) { + # to 1 in case we are installing windows binaries + if ($vars{"binary_windows"}) { $vars{"collection-wintools"} = 1; ++$vars{'n_collections_selected'}; } @@ -2809,7 +2809,7 @@ sub create_welcome { push @::welcome_arr, __( "See %s/index.html for links to documentation.\nThe TeX Live web site (https://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at https://tug.org/usergroups.html.", $::vars{'TEXDIR'}); - if (win32() + if (wndws() || ($vars{'instopt_adjustpath'} && $vars{'tlpdbopt_desktop_integration'} != 2)) { ; # don't tell them to make path adjustments on Windows, diff --git a/Master/install-tl-windows.bat b/Master/install-tl-windows.bat index a20901003b0..e3831b6f72e 100755 --- a/Master/install-tl-windows.bat +++ b/Master/install-tl-windows.bat @@ -19,6 +19,12 @@ if %ver_str:~,3% == 6.0 ( echo TeX Live 2020 has not been tested on Windows Vista.
pause
)
+if not "AMD64"=="%PROCESSOR_ARCHITECTURE%" (
+if not "AMD64"=="%PROCESSOR_ARCHITEW6432%" (
+ echo 32-bit no longer supported
+ pause
+ goto eoff
+))
rem version of external perl, if any. used by install-tl.
set extperl=0
diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl index a1eca65a686..7f3620fafc4 100755 --- a/Master/texmf-dist/scripts/texlive/fmtutil.pl +++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl @@ -42,9 +42,9 @@ use Cwd; # don't import anything automatically, this requires us to explicitly # call functions with TeXLive::TLUtils prefix, and makes it easier to # find and if necessary remove references to TLUtils -use TeXLive::TLUtils qw(); +use TeXLive::TLUtils qw(wndws); -require TeXLive::TLWinGoo if TeXLive::TLUtils::win32; +require TeXLive::TLWinGoo if wndws(); # numerical constants my $FMT_NOTSELECTED = 0; @@ -53,8 +53,8 @@ my $FMT_FAILURE = 2; my $FMT_SUCCESS = 3; my $FMT_NOTAVAIL = 4; -my $nul = (win32() ? 'nul' : '/dev/null'); -my $sep = (win32() ? ';' : ':'); +my $nul = (wndws() ? 'nul' : '/dev/null'); +my $sep = (wndws() ? ';' : ':'); my @deferred_stderr; my @deferred_stdout; @@ -84,7 +84,7 @@ chomp(our $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`); chomp(our $TEXMFHOME = `kpsewhich -var-value=TEXMFHOME`); # make sure that on windows *everything* is in lower case for comparison -if (win32()) { +if (wndws()) { $TEXMFDIST = lc($TEXMFDIST); $TEXMFVAR = lc($TEXMFVAR); $TEXMFSYSVAR = lc($TEXMFSYSVAR); @@ -280,7 +280,7 @@ sub main { # but for compatibility we'll silently keep the option. $cmd = 'edit'; my $editor = $ENV{'VISUAL'} || $ENV{'EDITOR'}; - $editor ||= (&win32 ? "notepad" : "vi"); + $editor ||= (&wndws ? "notepad" : "vi"); if (-r $changes_config_file) { ©File($changes_config_file, $bakFile); } else { @@ -389,7 +389,7 @@ sub callback_build_formats { # So make our own temp dir. my $tmpdir = ""; if (! $opts{"dry-run"}) { - if (win32()) { + if (wndws()) { my $foo; my $tmp_deflt = File::Spec->tmpdir; for my $i (1..5) { @@ -519,7 +519,7 @@ sub callback_build_formats { print_info("failed to build: $err (@err)\n") if ($err); print_info("total formats: $total\n"); chdir($thisdir) || warn "chdir($thisdir) failed: $!"; - if (win32()) { + if (wndws()) { # try to remove the tmpdir with all files TeXLive::TLUtils::rmtree($tmpdir); } @@ -1199,7 +1199,7 @@ sub determine_config_files { die "$prg: Config file \"$f\" not found"; } } - push @tmp, (win32() ? lc($f) : $f); + push @tmp, (wndws() ? lc($f) : $f); } @{$opts{'cnffile'}} = @tmp; # in case that config files are given on the command line, the first @@ -1210,12 +1210,12 @@ sub determine_config_files { chomp(@all_files); my @used_files; for my $f (@all_files) { - push @used_files, (win32() ? lc($f) : $f); + push @used_files, (wndws() ? lc($f) : $f); } # my $TEXMFLOCALVAR; my @TEXMFLOCAL; - if (win32()) { + if (wndws()) { chomp($TEXMFLOCALVAR =`kpsewhich --expand-path=\$TEXMFLOCAL`); @TEXMFLOCAL = map { lc } split(/;/ , $TEXMFLOCALVAR); } else { @@ -1351,7 +1351,7 @@ sub save_fmtutil { # and reset it to the real home dir of root. sub reset_root_home { - if (!win32() && ($> == 0)) { # $> is effective uid + if (!wndws() && ($> == 0)) { # $> is effective uid my $envhome = $ENV{'HOME'}; # if $HOME isn't an existing directory, we don't care. if (defined($envhome) && (-d $envhome)) { @@ -1420,16 +1420,6 @@ sub print_deferred_error { } -# copied from TeXLive::TLUtils to reduce dependencies -sub win32 { - if ($^O =~ /^MSWin/i) { - return 1; - } else { - return 0; - } -} - - # version, help. diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index e7117c23c62..f91ac5289bc 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -51,7 +51,7 @@ BEGIN { $Master =~ s!\\!/!g; $Master =~ s![^/]*$!../../..! unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i); - $bindir = "$Master/bin/win32"; + $bindir = "$Master/bin/windows"; $kpsewhichname = "kpsewhich.exe"; # path already set by wrapper batchfile } else { @@ -96,7 +96,7 @@ use TeXLive::TLWinGoo; use TeXLive::TLDownload; use TeXLive::TLConfFile; use TeXLive::TLCrypto; -TeXLive::TLUtils->import(qw(member info give_ctan_mirror win32 dirname +TeXLive::TLUtils->import(qw(member info give_ctan_mirror wndws dirname mkdirhier copy debug tlcmp repository_to_array)); use TeXLive::TLPaper; @@ -520,7 +520,7 @@ sub main { # and on Windows our Config.pm can apparently interfere, so always # skip it there. Or if users have NOPERLDOC set in the environment. my @noperldoc = (); - if (win32() || $ENV{"NOPERLDOC"}) { + if (wndws() || $ENV{"NOPERLDOC"}) { @noperldoc = ("-noperldoc", "1"); } else { if (!TeXLive::TLUtils::which("perldoc")) { @@ -843,7 +843,7 @@ sub do_cmd_and_check { if ($opts{"dry-run"}) { $ret = $F_OK; $out = ""; - } elsif (win32() && (! -r "$Master/bin/win32/luatex.dll")) { + } elsif (wndws() && (! -r "$Master/bin/windows/luatex.dll")) { # deal with the case where only scheme-infrastructure is installed # on Windows, thus no luatex.dll is available and the wrapper cannot be started tlwarn("Cannot run wrapper due to missing luatex.dll\n"); @@ -895,6 +895,7 @@ sub handle_execute_actions { if (defined($localtlpdb->get_package('context')) && (-x "$bindir/texlua" || -x "$bindir/texlua.exe")) { $errors += do_cmd_and_check("mtxrun --generate"); + $errors += run_postinst_cmd("context --luatex --generate"); } $::files_changed = 0; } @@ -1013,7 +1014,7 @@ sub handle_execute_actions { if ($regenerate_language) { for my $ext ("dat", "def", "dat.lua") { my $lang = "language.$ext"; - if (! TeXLive::TLUtils::win32()) { + if (! TeXLive::TLUtils::wndws()) { # Use full path for external command, except on Windows. $lang = "$TEXMFSYSVAR/tex/generic/config/$lang"; } @@ -1502,7 +1503,7 @@ sub action_path { } init_local_db(); my $winadminmode = 0; - if (win32()) { + if (wndws()) { # # for w32 we do system wide vs user setting detection as follows: # - if --w32mode is NOT given, @@ -1561,9 +1562,9 @@ sub action_path { } my $ret = $F_OK; if ($what =~ m/^add$/i) { - if (win32()) { + if (wndws()) { $ret |= TeXLive::TLUtils::w32_add_to_path( - $localtlpdb->root . "/bin/win32", + $localtlpdb->root . "/bin/windows", $winadminmode); # ignore this return value, since broadcase_env might return # nothing in case of errors, and there is no way around it. @@ -1576,9 +1577,9 @@ sub action_path { $localtlpdb->option("sys_info")); } } elsif ($what =~ m/^remove$/i) { - if (win32()) { + if (wndws()) { $ret |= TeXLive::TLUtils::w32_remove_from_path( - $localtlpdb->root . "/bin/win32", + $localtlpdb->root . "/bin/windows", $winadminmode); # ignore this return value, since broadcase_env might return # nothing in case of errors, and there is no way around it. @@ -3291,7 +3292,7 @@ sub action_update { } $updated{$pkg} = 1; next; - } elsif (win32() && ($pkg =~ m/$CriticalPackagesRegexp/)) { + } elsif (wndws() && ($pkg =~ m/$CriticalPackagesRegexp/)) { # we pretend that the update happened # in order to calculate file changes properly $updated{$pkg} = 1; @@ -3395,7 +3396,7 @@ sub action_update { my $parentobj = $localtlpdb->get_package($parent); if (!defined($parentobj)) { # well, in this case we might have hit a package that only - # has .ARCH package, like psv.win32, so do nothing + # has .ARCH package, like psv.windows, so do nothing debug("$prg: .ARCH package without parent, not announcing postaction\n"); } else { debug("$prg: announcing parent execute action for $pkg\n"); @@ -3410,7 +3411,7 @@ sub action_update { # TODO logpackage("failed update: $pkg ($rev -> $mediarevstr)"); tlwarn("$prg: Installation of new version of $pkg failed, trying to unwind.\n"); - if (win32()) { + if (wndws()) { # w32 is notorious for not releasing a file immediately # we experienced permission denied errors my $newname = $unwind_package; @@ -3557,7 +3558,7 @@ sub action_update { my @found_pkgs = $localtlpdb->find_file($k); if ($#found_pkgs >= 0) { my $bad_file = 1; - if (win32()) { + if (wndws()) { # on w32 the packages have not been removed already, # so we check that the only package listed in @found_pkgs # is the one we are working on ($pkg) @@ -3583,7 +3584,7 @@ sub action_update { } } - if (!win32()) { + if (!wndws()) { for my $f (@infra_files_to_be_removed) { # TODO actually unlink the stuff #unlink("$Master/$f"); @@ -3614,7 +3615,7 @@ sub action_update { } # infra update and tlmgr restart on w32 is done by the updater batch script - if (win32() && $opts{'self'} && !$opts{"list"} && @critical) { + if (wndws() && $opts{'self'} && !$opts{"list"} && @critical) { info("$prg: Preparing TeX Live infrastructure update...\n"); for my $f (@infra_files_to_be_removed) { debug("file scheduled for removal $f\n"); @@ -3629,7 +3630,7 @@ sub action_update { } # only when we are not dry-running we restart the program - if (!win32() && $restart_tlmgr && !$opts{"dry-run"} && !$opts{"list"}) { + if (!wndws() && $restart_tlmgr && !$opts{"dry-run"} && !$opts{"list"}) { info("$prg: Restarting to complete update ...\n"); debug("restarting tlmgr @::SAVEDARGV\n"); # cleanup temp files before re-exec-ing tlmgr @@ -4760,11 +4761,11 @@ sub action_option { # ignore generate_update which is no longer used or needed. next if ($o eq "generate_updmap"); # ignore some things which are w32 specific - next if ($o eq "desktop_integration" && !win32()); - next if ($o eq "file_assocs" && !win32()); - next if ($o eq "w32_multi_user" && !win32()); + next if ($o eq "desktop_integration" && !wndws()); + next if ($o eq "file_assocs" && !wndws()); + next if ($o eq "w32_multi_user" && !wndws()); # - if (win32()) { + if (wndws()) { next if ($o =~ m/^sys_/); } if (defined $TLPDBOptions{$o}) { @@ -4828,7 +4829,7 @@ sub action_option { # when running w32 do not allow that a non-admin users sets # this from false to true my $do_it = 0; - if (win32()) { + if (wndws()) { if (admin()) { $do_it = 1; } else { @@ -4937,9 +4938,9 @@ sub action_option { # sub action_platform { my $ret = $F_OK; - my @extra_w32_packs = qw/tlperl.win32 tlgs.win32 + my @extra_w32_packs = qw/tlperl.windows tlgs.windows collection-wintools - dviout.win32 wintools.win32/; + dviout.windows wintools.windows/; if ($^O =~ /^MSWin/i) { warn("action `platform' not supported on Windows\n"); # return an error here so that we don't go into post-actions @@ -5011,7 +5012,7 @@ sub action_platform { } } } - if (TeXLive::TLUtils::member('win32', @todoarchs)) { + if (TeXLive::TLUtils::member('windows', @todoarchs)) { # install the necessary w32 stuff for my $p (@extra_w32_packs) { info("install: $p\n"); @@ -5069,7 +5070,7 @@ sub action_platform { } } } - if (TeXLive::TLUtils::member('win32', @todoarchs)) { + if (TeXLive::TLUtils::member('windows', @todoarchs)) { for my $p (@extra_w32_packs) { info("remove: $p\n"); $localtlpdb->remove_package($p) if (!$opts{"dry-run"}); @@ -5315,7 +5316,7 @@ Error message from creating MainWindow: # Return zero if successful, nonzero if failure. # sub uninstall_texlive { - if (win32()) { + if (wndws()) { printf STDERR "Please use \"Add/Remove Programs\" from the Control Panel " . "to uninstall TeX Live!\n"; return ($F_ERROR); @@ -5499,7 +5500,7 @@ sub init_tltree { # if we are on W32, die (no find). my $arch = $localtlpdb->platform(); - if ($arch eq "win32") { + if ($arch eq "windows") { tldie("$prg: sorry, cannot check this on Windows.\n"); } @@ -6038,7 +6039,7 @@ sub check_depends { # For each package, check that it is a dependency of some collection. if (! exists $coll_deps{$pkg}) { # Except that schemes and our ugly Windows packages are ok. - push (@no_dep, $pkg) unless $pkg =~/^scheme-|\.win32$/; + push (@no_dep, $pkg) unless $pkg =~/^scheme-|\.windows$/; } # For each dependency, check that we have a package. @@ -6156,7 +6157,7 @@ sub action_postaction { tlwarn("$prg: action postaction needs as second argument one from 'shortcut', 'fileassoc', 'script'\n"); return; } - if (win32()) { + if (wndws()) { if ($opts{"w32mode"}) { if ($opts{"w32mode"} eq "user") { if (TeXLive::TLWinGoo::admin()) { @@ -6191,7 +6192,7 @@ sub action_postaction { @todo = $localtlpdb->expand_dependencies("-only-arch", $localtlpdb, @todo); } if ($type =~ m/^shortcut$/i) { - if (!win32()) { + if (!wndws()) { tlwarn("$prg: action postaction shortcut only works on windows.\n"); return; } @@ -6205,7 +6206,7 @@ sub action_postaction { } } } elsif ($type =~ m/^fileassoc$/i) { - if (!win32()) { + if (!wndws()) { tlwarn("$prg: action postaction fileassoc only works on windows.\n"); return; } @@ -6919,7 +6920,7 @@ sub init_local_db { # - if we are on Windows, it does not start with Drive:[\/] if (! ( $location =~ m!^(https?|ftp)://!i || $location =~ m!$TeXLive::TLUtils::SshURIRegex!i || - (win32() && (!(-e $location) || ($location =~ m!^.:[\\/]!) ) ) ) ) { + (wndws() && (!(-e $location) || ($location =~ m!^.:[\\/]!) ) ) ) ) { # seems to be a local path, try to normalize it my $testloc = abs_path($location); # however, if we were given a url, that will get "normalized" to the diff --git a/Master/texmf-dist/scripts/texlive/tlmgrgui.pl b/Master/texmf-dist/scripts/texlive/tlmgrgui.pl index 562ee8d1562..b6fee7e32fb 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgrgui.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgrgui.pl @@ -38,7 +38,7 @@ use Pod::Text; #use Devel::Leak; -use TeXLive::TLUtils qw(setup_programs platform_desc win32 debug); +use TeXLive::TLUtils qw(setup_programs platform_desc wndws debug); use TeXLive::TLConfig; # @@ -509,7 +509,7 @@ sub setup_menu_system { $menu->add('cascade', -label => __("Actions"), -menu => $menu_actions); } # on win32 people expect to have the Help button on the right side - if (win32()) { $menu->add('separator'); } + if (wndws()) { $menu->add('separator'); } $menu->add('cascade', -label => __("Help"), -menu => $menu_help); # @@ -545,7 +545,7 @@ sub setup_menu_system { -command => sub { do_general_settings(); }); $menu_options->add('command', -label => __("Paper ..."), -command => sub { do_paper_settings(); }); - if (!win32() && $mode_expert) { + if (!wndws() && $mode_expert) { $menu_options->add('command', -label => __("Platforms ..."), -command => sub { do_arch_settings(); }); } @@ -608,13 +608,13 @@ sub setup_menu_system { -state => $::action_button_state, -command => \&cb_handle_restore); - if (!win32()) { + if (!wndws()) { $menu_actions->add('command', -label => __("Handle symlinks in system dirs") . " ...", -state => $::action_button_state, -command => \&cb_handle_symlinks); } - if (!win32()) { + if (!wndws()) { $menu_actions->add('separator'); $menu_actions->add('command', -label => __("Remove TeX Live %s ...", $TeXLive::TLConfig::ReleaseYear), -state => $::action_button_state, @@ -1190,7 +1190,7 @@ sub do_general_settings { $back_config_set->Button(-text => __("Change"), -command => sub { select_autobackup($sw); }); - if (!win32()) { + if (!wndws()) { push @config_set_l, $back_config_set->Label(-text => __("Link destination for programs"), -anchor => "w"); $settings_label{'sys_bin'} = $back_config_set->Label(-textvariable => \$changeddefaults{"sys_bin"}{'display'}); @@ -1216,7 +1216,7 @@ sub do_general_settings { -command => sub { edit_dir_option ($sw, "sys_man"); }); } - if (win32()) { + if (wndws()) { push @config_set_l, $back_config_set->Label(-text => __("Create shortcuts on the desktop"), -anchor => "w"); $settings_label{'desktop_integration'} = $back_config_set->Label(-textvariable => \$changeddefaults{"desktop_integration"}{'display'}); @@ -1289,7 +1289,7 @@ sub apply_settings_changes { ########## PAPER HANDLING ################# sub init_paper_xdvi { - if (!win32()) { + if (!wndws()) { $papers{"xdvi"} = TeXLive::TLPaper::get_paper_list("xdvi"); $currentpaper{"xdvi"} = $papers{"xdvi"}->[0]; } @@ -2274,7 +2274,7 @@ You can then restart it to proceed with further updates."); $t .= "\n\n" . __("(Further updates will be available after tlmgr has been updated.)"); } - $t .= "\n\n" . __("Please wait a bit after the program has terminated so that the update can be completed.") if win32(); + $t .= "\n\n" . __("Please wait a bit after the program has terminated so that the update can be completed.") if wndws(); $sw->add("Label", -text => $t)->pack(-padx => "3m", -pady => "3m"); $sw->Show; } diff --git a/Master/texmf-dist/scripts/texlive/uninstall-win32.pl b/Master/texmf-dist/scripts/texlive/uninstall-windows.pl index 71aa86652a4..c194eda4b3b 100755 --- a/Master/texmf-dist/scripts/texlive/uninstall-win32.pl +++ b/Master/texmf-dist/scripts/texlive/uninstall-windows.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# $Id$ +# $Id: uninstall-win32.pl 63068 2022-04-18 05:58:07Z preining $ # Copyright 2008, 2010, 2011, 2012, 2014 Norbert Preining # # GUI for tlmgr @@ -61,7 +61,7 @@ sub doit { `rmdir /s /q "$menupath\\$TeXLive::TLConfig::WindowsMainMenuName" 2>nul`; # remove bindir from PATH settings - TeXLive::TLUtils::w32_remove_from_path("$Master/bin/win32", + TeXLive::TLUtils::w32_remove_from_path("$Master/bin/windows", $localtlpdb->option("w32_multi_user")); # unsetenv_reg("TEXBINDIR"); diff --git a/Master/texmf-dist/scripts/texlive/updmap.pl b/Master/texmf-dist/scripts/texlive/updmap.pl index d2d91221c51..bfa1c5cc747 100755 --- a/Master/texmf-dist/scripts/texlive/updmap.pl +++ b/Master/texmf-dist/scripts/texlive/updmap.pl @@ -36,7 +36,7 @@ my $version = "r$svnrev ($lastchdate)"; use Getopt::Long qw(:config no_autoabbrev ignore_case_always); use strict; -use TeXLive::TLUtils qw(mkdirhier mktexupd win32 basename dirname +use TeXLive::TLUtils qw(mkdirhier mktexupd wndws basename dirname sort_uniq member touch); (my $prg = basename($0)) =~ s/\.pl$//; @@ -53,7 +53,7 @@ chomp(my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`); chomp(my $TEXMFHOME = `kpsewhich -var-value=TEXMFHOME`); # make sure that on windows *everything* is in lower case for comparison -if (win32()) { +if (wndws()) { $TEXMFDIST = lc($TEXMFDIST); $TEXMFVAR = lc($TEXMFVAR); $TEXMFSYSVAR = lc($TEXMFSYSVAR); @@ -231,7 +231,7 @@ sub main { if (! -f $f) { die "$prg: Config file \"$f\" not found."; } - push @tmp, (win32() ? lc($f) : $f); + push @tmp, (wndws() ? lc($f) : $f); } @{$opts{'cnffile'}} = @tmp; # in case that config files are given on the command line, the first @@ -242,12 +242,12 @@ sub main { chomp(@all_files); my @used_files; for my $f (@all_files) { - push @used_files, (win32() ? lc($f) : $f); + push @used_files, (wndws() ? lc($f) : $f); } # my $TEXMFLOCALVAR; my @TEXMFLOCAL; - if (win32()) { + if (wndws()) { chomp($TEXMFLOCALVAR =`kpsewhich --expand-path=\$TEXMFLOCAL`); @TEXMFLOCAL = map { lc } split(/;/ , $TEXMFLOCALVAR); } else { @@ -421,7 +421,7 @@ sub main { # but for compatibility we'll silently keep the option. $cmd = 'edit'; my $editor = $ENV{'VISUAL'} || $ENV{'EDITOR'}; - $editor ||= (&win32 ? "notepad" : "vi"); + $editor ||= (wndws() ? "notepad" : "vi"); if (-r $changes_config_file) { ©File($changes_config_file, $bakFile); } else { @@ -593,7 +593,7 @@ sub setupSymlinks { sub SymlinkOrCopy { my ($dir, $src, $dest) = @_; return ($src, $dest) if $opts{"dry-run"}; - if (&win32 || $opts{'copy'}) { # always copy + if (wndws() || $opts{'copy'}) { # always copy ©File("$dir/$src", "$dir/$dest"); } else { # symlink if supported by fs, copy otherwise system("cd \"$dir\" && ln -s $src $dest 2>/dev/null || " @@ -2216,7 +2216,7 @@ sub merge_data { # and reset it to the real home dir of root. sub reset_root_home { - if (!win32() && ($> == 0)) { # $> is effective uid + if (!wndws() && ($> == 0)) { # $> is effective uid my $envhome = $ENV{'HOME'}; # if $HOME isn't an existing directory, we don't care. if (defined($envhome) && (-d $envhome)) { diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl index a86ecdf33da..02bd6a2bd40 100755 --- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl +++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl @@ -1,10 +1,6 @@ -#!/bin/sh -# next line ignored by wish but not by sh \ -TK_SILENCE_DEPRECATION=1 exec wish "$0" -- "$@" -# The above environment variable is set to suppress -# a warning message under MacOS Catalina and Big Sur +#!/usr/bin/env wish -# Copyright 2017-2022 Siep Kroonenberg +# Copyright 2017-2023 Siep Kroonenberg # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -357,7 +353,9 @@ proc selective_dis_enable {} { } # 64-bit windows - if {$::tcl_platform(platform) eq "windows" && $::wprocessor eq "AMD64"} { + # we disable this menu, but we may possibly resurrect it later + # for windows on arm support; therefore 'if {0 && ...} + if {0 && $::tcl_platform(platform) eq "windows" && $::wprocessor eq "AMD64"} { dis_enable_w64 } }; # selective_dis_enable @@ -939,7 +937,7 @@ proc get_packages_info_remote {} { unset -nocomplain ::loaded track_err set catv "rcat-version" - if {[dict get $::pkgs texlive.infra localrev] < 56458} { set catv "cat-version" } + if [catch {run_cmd \ "info --data name,remoterev,$catv,category,shortdesc"}] { do_debug [get_stacktrace] @@ -2350,6 +2348,7 @@ Please configure a valid repository" $::repos(main)] # with 'unzip -T', but this can only be done AFTER downloading. # See also tcl commands 'file mtime', and 'clock scan' +if 0 { # $::wprocessor will later decide whether a w64 menu will be created. if {$::tcl_platform(platform) eq "windows"} { set ::wprocessor $::env(PROCESSOR_ARCHITECTURE) @@ -2630,7 +2629,7 @@ proc add_or_update_w64 {lr} { update idletasks return 1 } - +}; # if 0 ##### main window ##################################################### proc populate_main {} { @@ -2710,7 +2709,7 @@ proc populate_main {} { .mn.opt add command -label "[__ "Platforms"] ..." -command platforms_select } - if {$::tcl_platform(platform) eq "windows" && $::wprocessor eq "AMD64"} { + if {0 && $::tcl_platform(platform) eq "windows" && $::wprocessor eq "AMD64"} { .mn add cascade -label "64-bit Windows" -menu .mn.w64 menu .mn.w64 set inx -1 |