diff options
-rwxr-xr-x | Master/wingoo-demo.bat | 31 | ||||
-rw-r--r-- | Master/wingoo-demo.pl | 126 |
2 files changed, 0 insertions, 157 deletions
diff --git a/Master/wingoo-demo.bat b/Master/wingoo-demo.bat deleted file mode 100755 index a3589ba8d20..00000000000 --- a/Master/wingoo-demo.bat +++ /dev/null @@ -1,31 +0,0 @@ -@echo off
-
-rem TeX Live Root; ends with backslash
-rem This should also work with UNC names
-set tlroot=%~dp0
-set tldrive=%~d0
-
-%tldrive%
-cd %tlroot%
-
-rem we need wget in the path, so add tlpkg\bin to the path
-set pathsave=%path%
-path %path%;%tlroot%tlpkg\bin
-
-rem use provided Perl
-
-set PERL5SAVE=%PERL5LIB%
-
-set PERL5LIB=%tlroot%tlpkg\lib\Perl5_lib-TL_inst
-"%tlroot%tlpkg\bin\perl" "%tlroot%wingoo-demo.pl"
-
-pause Done
-
-rem cleanup in case of start from command-line
-
-set PERL5LIB=%PERL5SAVE%
-set PERL5SAVE=
-path %pathsave%
-set pathsave=
-set tldrive=
-set tlroot=
diff --git a/Master/wingoo-demo.pl b/Master/wingoo-demo.pl deleted file mode 100644 index c73e3626d64..00000000000 --- a/Master/wingoo-demo.pl +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env perl -# For testing, edit $ro_dir and $wr_dir as needed. - -# $ro_dir should be read-only. -# $wr_dir should be writable. - -#!/usr/bin/env perl - -use strict; - -BEGIN { - $^W = 1; - my $me=$0; - $me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i; - - if ($me=~m!/!) { - ($::installerdir=$me)=~s!(.*)/.*$!$1!; - } else { - # This shouldn't occur if called from batchfile - $::installerdir='.'; - } - unshift (@INC, "$::installerdir/tlpkg"); - # unshift (@INC, "$::installerdir/bin/win32") if $^O=~/^MSWin(32|64)$/i; -} - -use TeXLive::TLWinGoo; # safe under Unix/Linux! - -my $ro_dir = "z:/aps"; - -sub maybenot { - my $bool = shift; - return $bool ? " is " : " is not "; -} - -sub create_file { - my $name = shift; - return if -e $name; - open DUMMY, ">".$name; - print DUMMY "Hello"; - close DUMMY; -} - -sub print_search_paths { - print "System path: ".get_system_path()."\n"; - print "User path: ".get_user_path()."\n"; -} - -print ((join "\n", @INC)."\n"); -# admin - -if (admin()) { - print "Admin or not on Windows\n"; -} else { - print "Not admin\n"; -} - -# country - -print "Country: " . reg_country() . "\n"; - -# global_tmpdir - -print "Global tempdir: " . global_tmpdir()."\n"; - -if ($^O !~ /^MSWin(32|64)$/i) { - print "Not Windows; bailing out...\n"; - exit; -} - -# dir_writable - -my $wr_dir = $ENV{'USERPROFILE'}; -$wr_dir =~ s/\\/\//g; -mkdir $wr_dir unless -e $wr_dir; -print $wr_dir . maybenot(dir_writable($wr_dir)) . "writable\n"; -print $ro_dir . maybenot(dir_writable($ro_dir)) . "writable\n"; - -# expand_string - -print expand_string("pre\\%systemROOT%\\post")."\n"; - -# win_which_dir - -print "cmd.exe found in " . TeXLive::TLWinGoo::win_which_dir("cmd.exe") . "\n"; - -# adding and removing texbindir - -my $wr_dir1 = $wr_dir . "/tex1"; -mkdir $wr_dir1 unless -e $wr_dir1; -create_file( $wr_dir1."/tex.exe" ); -add_texbindir_to_path($wr_dir1); -print_search_paths(); -print "tex.exe found in " . - TeXLive::TLWinGoo::win_which_dir("tex.exe") . "\n"; - -my $wr_dir2 = $wr_dir . "/tex2"; -mkdir $wr_dir2 unless -e $wr_dir2; -create_file( $wr_dir2."/tex.exe" ); -add_texbindir_to_path($wr_dir2); -print_search_paths(); -print "tex.exe found in " . - TeXLive::TLWinGoo::win_which_dir("tex.exe") . "\n"; - -# the problem case: no admin, but TeX on system path - -if (!admin()) { - my $fn = expand_string("%windir%")."/TEX.EXE"; - $fn =~ s/\\/\//g; - create_file($fn); # a tex.exe on the system path! - add_texbindir_to_path(expand_string($wr_dir2)); - my @wge = wg_error(); - if (@wge) { - print $wge[1]."\n"; - } - print_search_paths(); - print "tex.exe found in " . TeXLive::TLWinGoo::win_which_dir("tex.exe") . "\n"; - unlink $fn; -} - -# adding a filetype - -register_script_type(".rb","x:/ruby/bin/ruby.exe"); - -# broadcast environment changes - -broadcast_env(); |