summaryrefslogtreecommitdiff
path: root/Master/tlpkg/doc
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/doc')
-rwxr-xr-xMaster/tlpkg/doc/w32client31
-rwxr-xr-xMaster/tlpkg/doc/w32client.bat56
2 files changed, 87 insertions, 0 deletions
diff --git a/Master/tlpkg/doc/w32client b/Master/tlpkg/doc/w32client
new file mode 100755
index 00000000000..8f41ef065dc
--- /dev/null
+++ b/Master/tlpkg/doc/w32client
@@ -0,0 +1,31 @@
+#!/usr/bin/env perl
+
+# Tlmgr.pl can be loaded either by itself, as a program, or as a library,
+# at least under Windows.
+# An application of this is configuring a client Windows workstation
+# for a pre-installed TeX Live installation on a local network.
+
+# Currently, this script is just proof-of-concept.
+# Public domain.
+
+BEGIN {
+ $^W = 1;
+ require "tlmgr.pl";
+}
+
+# some examples of accessing tlmgr functionality
+
+# Print some info
+print "Version:\n" . give_version() . "\n";
+print "Mirror:\n" . give_ctan_mirror() . "\n";
+print "Master: " . $Master ."\n";
+
+# Only make user-level changes
+non_admin();
+
+# Add TeX Live to path (not pretty...)
+unshift @ARGV, 'add';
+action_path();
+
+# create a shortcut
+execute_action('postaction', 'install', 'shortcut', 'dviout.win32');
diff --git a/Master/tlpkg/doc/w32client.bat b/Master/tlpkg/doc/w32client.bat
new file mode 100755
index 00000000000..1900bc7d5d6
--- /dev/null
+++ b/Master/tlpkg/doc/w32client.bat
@@ -0,0 +1,56 @@
+@echo off
+rem Wrapper batchfile for Perl script of the same name
+rem both in the root of the TeX Live installation.
+rem Based on code from Tomasz M. Trzeciak.
+rem Public domain.
+
+rem First, check if this is DOS based system
+rem in DOS '^' is just a normal character
+if not ^x==x goto DOS
+
+rem Abort if we are running from UNC path
+if %~d0==\\ goto UNC
+
+rem Localize environment changes
+setlocal enableextensions
+
+set this=%~dp0
+
+rem Break search path into dir list and rebuild w/o tex dirs
+call :rebuildpath ";" "%path:;=" "%"
+
+rem Use TL Perl
+path %this%tlpkg\tlperl\bin;%this%bin\win32;%path%
+set PERL5LIB=%this%tlpkg\tlperl\lib;%this%tlpkg;%this%texmf\scripts\texlive
+
+rem Start Perl script of the same name
+perl "%~dpn0" %*
+rem Give user opportunity to scan output messages
+pause
+goto :eof
+
+rem Subroutine to build search path without tex directories
+rem any dir containing pdftex.exe is considered a tex dir
+:rebuildpath ";" dir list ...
+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
+rem Continue if tex dir
+if exist "%~1\pdftex.exe" goto :rebuildpath
+rem Add dir to path
+if not defined path (path %~1) else (path %path%;%~1)
+goto :rebuildpath
+
+:UNC
+echo Cannot run from UNC path.
+echo Map network drive to a drive letter and rerun the installer.
+echo You can use pushd/popd commands for temporary mapping.
+pause
+exit /b 1
+
+:DOS
+echo DOS and Windows 9x systems are not supported. Sorry.
+echo Windows 2000 or newer is required.
+pause