diff options
author | Norbert Preining <preining@logic.at> | 2009-05-12 15:53:11 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-05-12 15:53:11 +0000 |
commit | 7e5585bcd4f8ba119cad8f0a7e13b6a7a610776f (patch) | |
tree | c48db3cea0e4511d09d0e7b7fdf7ef7a04f68f6e /Master/tlpkg/TeXLive/TLWinGoo.pm | |
parent | c84165218f94bc15a1441e91a421f4d070bc5eb7 (diff) |
Move most of the stuff from tlpkg, tlmgr from branch to trunk
git-svn-id: svn://tug.org/texlive/trunk@13054 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLWinGoo.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLWinGoo.pm | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index fbc163dd39e..c4d0558ceaa 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -58,7 +58,6 @@ C<TeXLive::TLWinGoo> -- Additional utilities for Windows $prog, $args, $batgui); TeXLive::TLWinGoo::add_menu_shortcut($place, $name, $icon, $prog, $args, $batgui); - TeXLive::TLWinGoo::init_unshortbat($texdir); TeXLive::TLWinGoo::remove_desktop_shortcut($name); TeXLive::TLWinGoo::remove_menu_shortcut($place, $name); @@ -104,7 +103,6 @@ BEGIN { &add_menu_shortcut &remove_desktop_shortcut &remove_menu_shortcut - &init_unshortbat &create_uninstaller &unregister_uninstaller ); @@ -857,8 +855,7 @@ sub menu_path() { =pod -=item C<add_desktop_shortcut($texdir, $name, $icon, - $prog, $args, $batgui)> +=item C<add_desktop_shortcut($name, $icon, $prog, $args, $batgui)> Add a desktop shortcut, with name $name and icon $icon, pointing to program $prog with parameters $args (a string). Use a non-null @@ -866,14 +863,10 @@ batgui parameter if the shortcut starts a gui program via a batchfile. Then the inevitable command prompt will be hidden rightaway, leaving only the gui program visible. -The parameter $texdir is merely used to locate the batchfile -unshort.bat for uninstalling desktop shortcuts, which needs to be -updated. - =cut sub add_desktop_shortcut { - my ($texdir, $name, $icon, $prog, $args, $batgui) = @_; + my ($name, $icon, $prog, $args, $batgui) = @_; # create shortcut my ($shc, $shpath, $shfile); @@ -884,15 +877,6 @@ sub add_desktop_shortcut { $shc->{'ShowCmd'} = $batgui ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL; $shfile = desktop_path().'/'.$name.'.lnk'; $shc->Save($shfile); - - # update batchfile for uninstalling shortcuts - if (open UNSHORT, ">>$texdir/tlpkg/installer/unshort.bat") { - $shfile =~ s!/!\\!g; - print UNSHORT 'del "'.$shfile."\" 2>nul\n"; - close UNSHORT; - } else { - warn "Cannot open $texdir/tlpkg/installer/unshort.bat for appending: $!"; - } } =pod @@ -932,39 +916,16 @@ sub add_menu_shortcut { =pod -=item C<init_unshortbat($texdir)> - -Reinitialize unshort.bat, the shortcuts uninstaller. - -=cut - -sub init_unshortbat { - my $texdirw = shift; - my $menupath = menu_path(); - $menupath =~ s!/!\\!g; - - # batchfile for uninstalling shortcuts - if (open UNSHORT, ">$texdirw/tlpkg/installer/unshort.bat") { - print UNSHORT 'rmdir /s /q "'.$menupath."\\TeX Live 2008\" 2>nul\n"; - close UNSHORT; - } else { - warn "Cannot create $texdirw/tlpkg/installer/unshort.bat: $!"; - } -} - -=pod - =item C<remove_desktop_shortcut($name)> -For uninstallation of an individual package. We leave unshort.bat -alone because redundant entries are no big deal. +For uninstallation of an individual package. =cut sub remove_desktop_shortcut { my $name = shift; unlink desktop_path().'/'.$name.'.lnk'; -} +} =pod @@ -1035,7 +996,6 @@ path $td\\bin\\win32;%path% set PERL5LIB= \"$td\\tlpkg\\tlperl\\bin\\perl.exe\" \"$td\\texmf\\scripts\\texlive\\uninstall-win32.pl\" if errorlevel 1 exit -call \"$tdw\\tlpkg\\installer\\unshort.bat\" copy \"$tdw\\tlpkg\\installer\\uninst2.bat\" \"\%TEMP\%\" rem pause \"\%TEMP\%\\uninst2.bat\" |