summaryrefslogtreecommitdiff
path: root/Master/tlpkg/doc
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2008-06-20 21:02:00 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2008-06-20 21:02:00 +0000
commitd815dece6f595d991bfdb3406fc0c08bdb05f5b9 (patch)
treee94e46d6df16bb53e28d3076e6a554e9fc579031 /Master/tlpkg/doc
parenta0f84fbbee044a29c606009fc7d65cb29543330d (diff)
Windows mini-installer for enabling an existing network installation.
Not for direct use from dvd; therefore placed under tlpkg/doc. git-svn-id: svn://tug.org/texlive/trunk@8888 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/doc')
-rwxr-xr-xMaster/tlpkg/doc/install-mini154
-rwxr-xr-xMaster/tlpkg/doc/install-mini.bat27
2 files changed, 181 insertions, 0 deletions
diff --git a/Master/tlpkg/doc/install-mini b/Master/tlpkg/doc/install-mini
new file mode 100755
index 00000000000..564e4b0c894
--- /dev/null
+++ b/Master/tlpkg/doc/install-mini
@@ -0,0 +1,154 @@
+#!/usr/bin/env perl
+
+# copy this file and install-mini.bat to the same directory
+# as texmf, texmf-dist etc.
+
+# sample mini-installer to give Windows systems access to an
+# existing TeXLive installation
+
+# it assumes a standard directory layout, which avoids hard-coded paths.
+
+$^W = 1;
+
+use TeXLive::TLUtils qw(mkdirhier conv_to_win_path);
+#use Cwd 'abs_path';
+use TeXLive::TLWinGoo qw(non_admin add_texbindir_to_path setenv_reg
+ init_unshortbat add_desktop_shortcut add_menu_shortcut
+ register_extension register_file_type
+ update_assocs broadcast_env
+ create_uninstaller);
+use strict;
+
+my $texdir=$0;
+$texdir=~s!\\!/!g;
+$texdir=~s!(.*)/.*$!$1!;
+
+# private macros
+#my $private_root = $ENV{'USERPROFILE'}.'/texmf';
+
+# private runtime-generated files
+$::texlive_release = '2008';
+my $texdirw = $ENV{'USERPROFILE'}.'/.texlive'.$::texlive_release;
+$texdirw=~s!\\!/!g;
+my $private_var = $texdirw.'/texmf-var';
+my $private_var_bsl = $private_var;
+$private_var_bsl =~ s!/!\\!g;
+
+# make only per-user modifications
+non_admin();
+
+# general
+
+add_texbindir_to_path($texdir.'/bin/win32');
+broadcast_env();
+
+my $mainmenu = "TeX Live 2008";
+my $texbindir_bsl = $texdir.'/bin/win32';
+$texbindir_bsl =~ s!/!\\!g;
+
+mkdirhier("$texdirw/tlpkg/installer");
+create_uninstaller($texdir, $texdirw, $private_var, $texdirw.'/texmf-config');
+init_unshortbat($texdirw);
+
+# if the path can't be fixed globally add command prompt
+# with texbindir prepended to path
+
+if (uc(TeXLive::TLWinGoo::win_which_dir('tex.exe')) ne
+ uc($texdir.'/bin/win32') or
+ uc(TeXLive::TLWinGoo::win_which_dir('pdftex.exe')) ne
+ uc($texdir.'/bin/win32') or
+ uc(TeXLive::TLWinGoo::win_which_dir('luatex.exe')) ne
+ uc($texdir.'/bin/win32')) {
+ add_menu_shortcut(
+ $mainmenu,
+ 'TeX Live Prompt',
+ '',
+ $ENV{'COMSPEC'},
+ "/k \"path $texbindir_bsl;%path%\"",
+ '',
+ );
+}
+
+# texlive manual
+
+add_menu_shortcut(
+ $mainmenu,
+ 'TeX Live Manual (en)',
+ '', # default pdf icon
+ $texdir.'/texmf-doc/doc/english/texlive-en/live.pdf',
+ '',
+ '',
+);
+
+# texdoctk documentation browser
+
+if (-e $texdir.'/bin/win32/texdoctk.bat') {
+ add_menu_shortcut(
+ $mainmenu,
+ 'TeXdoc GUI',
+ '', # icon
+ $texdir.'/bin/win32/texdoctk.bat',
+ '', # arguments
+ 'batgui', # any non-null value to hide command-prompt
+ )
+}
+
+# psview
+
+add_desktop_shortcut(
+ $texdirw,
+ 'PS_View',
+ $texdir.'/tlpkg/tlpsv/psv.exe', # icon, not prog!
+ $texdir.'/bin/win32/psv.bat',
+ '', # no args
+ 'batgui', # any non-null value to hide command-prompt
+);
+add_menu_shortcut(
+ $mainmenu,
+ 'PS_View',
+ $texdir.'/tlpkg/tlpsv/psv.exe', # icon, not prog!
+ $texdir.'/bin/win32/psv.bat',
+ '', # no args
+ 'batgui', # any non-null value to hide command-prompt
+);
+register_extension(".ps", "PostScript");
+register_extension(".eps", "PostScript");
+register_file_type("PostScript",
+ '"'.$texdir.'/tlpkg/tlpsv/gswxlua.exe" -g '.
+ '"'.$texdir.'/tlpkg/tlgs/bin/gsdll32.dll" -l '.
+ '"'.$texdir.'/tlpkg/tlpsv/psv.wx.lua" -p '.
+ '"'.$texdir.'/tlpkg/tlpsv/psv_view.ps" -sINPUT="%1"');
+update_assocs();
+
+# xetex
+
+if (-e $texdir.'/bin/win32/xetex.exe') {
+ my $texmfcnf = $private_var.'/web2c;'.$texdir.'/texmf/web2c';
+ setenv_reg('TEXMFCNF', $texmfcnf);
+ broadcast_env();
+ mkdirhier($private_var."/fonts/cache");
+ system("xcopy", "/e", "/i", "/q", "/y", "\"$texbindir_bsl\\conf\"",
+ "\"$private_var_bsl\\fonts\\conf\"");
+ if (open(FONTSCONF, "<$texdir/bin/win32/conf/fonts.conf")) {
+ my @lines = <FONTSCONF>;
+ close(FONTSCONF);
+ if (open(FONTSCONF, ">$private_var/fonts/conf/fonts.conf")) {
+ my $winfontdir;
+ $winfontdir = $ENV{'SystemRoot'}.'/fonts';
+ $winfontdir =~ s!\\!/!g;
+ foreach (@lines) {
+ $_ =~ s!c:/Program Files/texlive/2008!$texdir!;
+ $_ =~ s!c:/windows/fonts!$winfontdir!;
+ print FONTSCONF;
+ }
+ close(FONTSCONF);
+ } else {
+ warn("Cannot open $private_var/fonts/conf/fonts.conf for writing\n");
+ }
+ } else {
+ warn ("Cannot open $texdir/bin/win32/conf/fonts.conf\n");
+ }
+ $ENV{'TEXMFCNF'} = $texmfcnf;
+ $ENV{'PATH'} = $texbindir_bsl.';'.$ENV{'PATH'};
+ system("\"$texbindir_bsl\\fc-cache.exe\"", "-v", "-r");
+}
diff --git a/Master/tlpkg/doc/install-mini.bat b/Master/tlpkg/doc/install-mini.bat
new file mode 100755
index 00000000000..7066014b3e3
--- /dev/null
+++ b/Master/tlpkg/doc/install-mini.bat
@@ -0,0 +1,27 @@
+@echo off
+
+rem copy this file and install-mini to the same directory
+rem as texmf, texmf-dist etc.
+
+rem TeX Live Root; ends with backslash
+rem This may also work with UNC names
+set tlroot=%~dp0
+set tldrive=%~d0
+
+%tldrive%
+cd %tlroot%
+
+rem use provided Perl
+
+set PERL5SAVE=%PERL5LIB%
+set PERL5LIB=%tlroot%tlpkg\tlperl\lib;%tlroot%tlpkg
+"%tlroot%tlpkg\tlperl\bin\perl" "%~dpn0" %*
+rem pause Done
+
+rem cleanup in case of start from command-line
+
+set PERL5LIB=%PERL5SAVE%
+set PERL5SAVE=
+set tldrive=
+set tlroot=
+pause \ No newline at end of file