diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2009-08-14 21:17:00 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2009-08-14 21:17:00 +0000 |
commit | fa2098b61daae762a16f425780bbe94b2ad4d6b4 (patch) | |
tree | e3d4b7c52ba6271b4225448b09dc35141ce597a6 /Master/tlpkg/doc/w32client | |
parent | 663d34ecb0cc047708846e6b410bd4088bdf06bf (diff) |
Client scripts: updated, documented, uninstaller and manifest files added
git-svn-id: svn://tug.org/texlive/trunk@14668 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/doc/w32client')
-rwxr-xr-x | Master/tlpkg/doc/w32client | 84 |
1 files changed, 48 insertions, 36 deletions
diff --git a/Master/tlpkg/doc/w32client b/Master/tlpkg/doc/w32client index 48a2ad1ef37..cf61f8a49c5 100755 --- a/Master/tlpkg/doc/w32client +++ b/Master/tlpkg/doc/w32client @@ -7,54 +7,20 @@ # Public domain. -# We try to use high-level code, but loading tlmgr.pl also gives as access -# to lower-level code from modules in <root>/tlmgr/TeXlive -# and from modules loaded by them. +# you can use either the simple or the advanced batch wrapper, +# but it should have the same name as this file, with .bat appended. BEGIN { $^W = 1; require "tlmgr.pl"; - - # don't need to re-require modules but do need to re-import names; - # sorry for the mess - Win32::TieRegistry->import( qw( $Registry - REG_SZ REG_EXPAND_SZ KEY_READ KEY_WRITE KEY_ALL_ACCESS - KEY_ENUMERATE_SUB_KEYS ) ); - $Registry->Delimiter('/'); - $Registry->ArrayValues(0); - $Registry->FixSzNulls(1); - Win32::Shortcut->import( qw( SW_SHOWNORMAL SW_SHOWMINNOACTIVE ) ); } -# 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"; - # for debugging: #$::opt_verbosity = 2; # Only make user-level changes even if admin $opts{'w32mode'} = 'user'; -# register uninstaller. Failure not fatal. -my $rootkey = $Registry -> Open("CUser", - {Access => Win32::TieRegistry::KEY_ALL_ACCESS()}); -my $k; -if ($rootkey) { - $k = $rootkey->CreateKey( - "software/microsoft/windows/currentversion/uninstall/OurTeXLive/"); - if ($k) { - $k->{"/DisplayName"} = "OurTeXLive 2009"; - $k->{"/UninstallString"} = "\"$Master\\w32unclient.bat\""; - $k->{'/DisplayVersion'} = "2009"; - $k->{'/URLInfoAbout'} = "http://ourwebsite.edu/ourtexlive"; - } -} -warn "Failed to register uninstaller\n" unless $k; - # The action_... functions read their arguments from @ARGV. # Add TeX Live to path @@ -77,5 +43,51 @@ TeXLive::TLWinGoo::update_assocs(); # optional unshift @ARGV, 'install', 'script', 'xetex'; action_postaction(); +#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +# optional advanced features. +# these make direct use of the modules in tlmgr/TeXlive +# and modules loaded by them. +# don't need to re-require modules but do need to re-import names + +Win32::TieRegistry->import( qw( $Registry + REG_SZ REG_EXPAND_SZ KEY_READ KEY_WRITE KEY_ALL_ACCESS + KEY_ENUMERATE_SUB_KEYS ) ); +$Registry->Delimiter('/'); +$Registry->ArrayValues(0); +$Registry->FixSzNulls(1); +Win32::Shortcut->import( qw( SW_SHOWNORMAL SW_SHOWMINNOACTIVE ) ); + +# register uninstaller. Failure not fatal. +# This really should be the first item. + +my $Master_bsl = $Master; +$Master_bsl =~ s,/,\\,g; + +my $rootkey = $Registry -> Open("CUser", + {Access => Win32::TieRegistry::KEY_ALL_ACCESS()}); +my $k; +if ($rootkey) { + $k = $rootkey->CreateKey( + "software/microsoft/windows/currentversion/uninstall/OurTeXLive/"); + if ($k) { + $k->{"/DisplayName"} = "OurTeXLive 2009"; + $k->{"/UninstallString"} = "\"$Master_bsl\\w32unclient.bat\""; + $k->{'/DisplayVersion'} = "2009"; + $k->{'/URLInfoAbout'} = "http://ourwebsite.edu/ourtexlive"; + } +} +warn "Failed to register uninstaller\n" unless $k; +# add a command-prompt shortcut with TeX Live first item on the path. +# note that for TeXworks, the wrapper already takes care of this. + +add_menu_shortcut( + $TeXLive::TLConfig::WindowsMainMenuName, + 'TeX Live Prompt', + '', + 'cmd', + "/k \"path $Master_bsl\\bin\\win32;%path%\"", + '', +); |