summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/install-tl.bat12
-rwxr-xr-xMaster/tl-portable.bat55
2 files changed, 48 insertions, 19 deletions
diff --git a/Master/install-tl.bat b/Master/install-tl.bat
index 068e3250db8..494835cd6ba 100755
--- a/Master/install-tl.bat
+++ b/Master/install-tl.bat
@@ -5,10 +5,8 @@ rem Copyright 2009 by Tomasz M. Trzeciak
rem Public Domain
rem First, check if this is DOS based system
-rem in DOS '&' is just a normal character
-echo.>nul & goto continue
-goto DOS
-:continue
+rem in DOS '^' is just a normal character
+if not ^x==x goto DOS
rem Now check for Windows NT which is also not supported
ver | find "NT"
@@ -33,7 +31,7 @@ set PERL5LIB=%~dp0tlpkg\tlperl\lib
rem Start installer
path
perl "%~dpn0" %*
-pause Done
+pause
goto :eof
rem Subroutine to build search path without tex directories
@@ -43,7 +41,7 @@ shift
rem The first argument (";") serves as a marker to reset the path
if "%~0"==";" set path=
rem Finish if no more arguments to process
-if "%~1"=="" goto :eof
+if [%1]==[] goto :eof
rem Continue if tex dir
if exist "%~1\pdftex.exe" goto :rebuildpath
rem Add dir to path
@@ -58,7 +56,7 @@ rem The manifest file tells Vista otherwise.
:UNC
echo Cannot run from UNC path.
echo Map network drive to a drive letter and rerun the installer.
-echo Use pushd/popd commands for temporary mapping.
+echo You can use pushd/popd commands for temporary mapping.
pause
exit /b 1
diff --git a/Master/tl-portable.bat b/Master/tl-portable.bat
index 563af038f66..db44978fc49 100755
--- a/Master/tl-portable.bat
+++ b/Master/tl-portable.bat
@@ -1,11 +1,23 @@
@echo off
-
-rem Copyright 2008 Siep Kroonenberg.
+rem Copyright 2008-2009 Siep Kroonenberg, Tomasz M. Trzeciak.
rem You may freely use, modify and/or distribute this file.
+rem First, check if this is DOS based system
+rem in DOS '^' is just a normal character
+if not ^x==x goto DOS
+
+rem Now check for Windows NT which is also not supported
+ver | find "NT"
+if not errorlevel 1 goto WinNT
+
+rem Abort if we are running from UNC path
+if %~d0==\\ goto UNC
+
+rem Localize environment changes
+setlocal enableextensions
+
rem TeX Live Root; ends with backslash
set TEXDIR=%~dp0
-set tldrive=%~d0
rem TEXDIR writable?
set TEXDIRW=%USERPROFILE%\.tlportable2008\
@@ -35,17 +47,36 @@ set TEXMFVAR=%TEXDIRW%texmf-var
set TEXMFCONFIG=%TEXDIRW%texmf-config
set TEXBINDIR=%TEXDIR%bin\win32
set platform=win32
-path %TEXDIR%bin\win32;%path%
rem use provided Perl
+set PERL5LIB=%TEXDIR%tlpkg\tlperl\lib
+path %TEXDIR%tlpkg\tlperl\bin;%TEXDIR%bin\win32;%path%
+perl "%TEXDIR%install-tl" --portable
+if errorlevel 1 goto failedinit
+
+rem start new command interperter with customized prompt and window title
+"%ComSpec%" /k "title TL-SHELL& prompt TL %prompt%"
+goto :eof
-set PERL5LIB=%TEXDIR%tlpkg\installer\perllib
-"%TEXDIR%tlpkg\installer\perl" "%TEXDIR%install-tl" --portable
-if not errorlevel 1 goto doit
-echo Initialization of TeXLive failed!
+:failedinit
+echo Initialization of TeX Live failed!
pause
-exit
+exit /b 1
-:doit
-set PROMPT=TL $P$G
-%COMSPEC% /k
+:UNC
+echo Cannot run from UNC path.
+echo Map network drive to a drive letter and rerun the script.
+echo You can use pushd/popd commands for temporary mapping.
+pause
+exit /b 1
+
+:WinNT
+echo Windows NT is not supported. Sorry.
+echo Windows 2000 or newer is required.
+pause
+exit /b 1
+
+:DOS
+echo DOS and Windows 9x systems are not supported. Sorry.
+echo Windows 2000 or newer is required.
+pause