diff options
Diffstat (limited to 'Master/tl-portable.bat')
-rwxr-xr-x | Master/tl-portable.bat | 55 |
1 files changed, 43 insertions, 12 deletions
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 |