texlive[48098] Master/install-tl: Win32 console windows solved

commits+siepo at tug.org commits+siepo at tug.org
Wed Jun 27 18:10:39 CEST 2018


Revision: 48098
          http://tug.org/svn/texlive?view=revision&revision=48098
Author:   siepo
Date:     2018-06-27 18:10:39 +0200 (Wed, 27 Jun 2018)
Log Message:
-----------
Win32 console windows solved

Modified Paths:
--------------
    trunk/Master/install-tl

Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl	2018-06-27 11:38:24 UTC (rev 48097)
+++ trunk/Master/install-tl	2018-06-27 16:10:39 UTC (rev 48098)
@@ -96,10 +96,13 @@
 @::WARNLINES = ();
 
 # debugging communication with external gui: use shared logfile
-# (assumes unix)
+
+our $dblfile = "/tmp/dblog";
+$dblfile = $ENV{'TEMP'} . "\\dblog.txt" if ($^O=~/^MSWin/i);
+$dblfile = $ENV{'TMPDIR'} . "/dblog" if ($^O eq 'darwin');
 sub dblog {
   my $s = shift;
-  open(my $dbf, ">>", "/tmp/dblog");
+  open(my $dbf, ">>", $dblfile);
   print $dbf "PERL: $s\n";
   close $dbf;
 }
@@ -224,6 +227,8 @@
   select(STDOUT);
   $| = 1;
 
+  # windows: suppress console windows when invoking other programs
+  Win32::SetChildShowWindow(0) if win32();
   # ___, defined in this file, replaces the GUI translating function
   *__ = \&::___;
 }
@@ -598,12 +603,6 @@
   if ($ret != $MENU_INSTALL) {
     tlwarn("Unknown return value of run_menu: $ret\n");
     exit(3);
-  } elsif (win32() && $from_ext_gui) {
-    create_profile($ENV{'tmpprofile'});
-    exit;
-    # the external gui will do the actual installation
-    # from a temporary batchfile using this temporary profile,
-    # this to prevent hundreds of dosboxes popping up
   }
 } else { # no interactive setting of options
   *__ = \&::___;
@@ -610,11 +609,6 @@
   if (!do_remote_init()) {
     die ("Exiting installation.\n");
   }
-  if (win32() && $from_ext_gui) {
-    # copy profile and let the gui restart the installation
-    TeXLive::copy("-f", $opt_profile, $ENV{'tmpprofile'});
-    exit;
-  }
   read_profile($opt_profile);
   if ($from_ext_gui) {
     print STDOUT "startinst\n";



More information about the tex-live-commits mailing list