From 0c3e30b7fe8e93071282ca440d05b538d25481f1 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Thu, 12 Jun 2008 20:34:37 +0000 Subject: Win32: in case of searchpath problems, add dosbox shortcuts with TL bin path prepended to normal path. git-svn-id: svn://tug.org/texlive/trunk@8696 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPostActions.pm | 25 ++++++++++++++++++++++++- Master/tlpkg/TeXLive/TLWinGoo.pm | 4 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Master/tlpkg/TeXLive/TLPostActions.pm b/Master/tlpkg/TeXLive/TLPostActions.pm index 19137fd4283..6376dd4a040 100644 --- a/Master/tlpkg/TeXLive/TLPostActions.pm +++ b/Master/tlpkg/TeXLive/TLPostActions.pm @@ -166,7 +166,7 @@ $PostInstall{'bin-tlpsv.win32'} = \&do_install_bin_tlpsv_win32; # bin-texlive # sub do_install_bin_texlive { - my ($texdir) = @_; + my ($texdir, $texdirw) = @_; if (win32()) { add_menu_shortcut( $mainmenu, @@ -176,12 +176,35 @@ sub do_install_bin_texlive { 'gui', 'batgui', ); + if (uc(TeXLive::TLWinGoo::win_which_dir('tex.exe')) ne + uc($texdir.'/bin/win32')) { + my $texbindir = $texdir."\\bin\\win32"; + $texbindir =~ s!/!\\!g; + add_menu_shortcut( + $mainmenu, + 'TeX Live Prompt', + '', + $ENV{'COMSPEC'}, + "/k \"path $texbindir;%path%\"", + '', + ); + add_desktop_shortcut( + $texdirw, + 'TeX Live Prompt', + '', + $ENV{'COMSPEC'}, + "/k \"path $texbindir;%path%\"", + '', + ); + } } } sub do_remove_bin_texlive { my ($texdir) = @_; if (win32()) { remove_menu_shortcut($mainmenu, 'TeX Live Manager'); + remove_menu_shortcut($mainmenu, 'TeX Live Prompt'); + remove_desktop_shortcut('TeX Live Prompt'); } } $PostInstall{'bin-texlive'} = \&do_install_bin_texlive; diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index 5107fe8c6c5..b868e75b2f7 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -868,7 +868,7 @@ sub add_desktop_shortcut { $shc->{'IconLocation'} = $icon if -f $icon; $shc->{'Path'} = $prog; $shc->{'Arguments'} = $args; - $shc->{'ShowCmd'} = SW_SHOWMINNOACTIVE if $batgui; + $shc->{'ShowCmd'} = $batgui ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL; $shfile = desktop_path().'/'.$name.'.lnk'; $shc->Save($shfile); @@ -901,7 +901,7 @@ sub add_menu_shortcut { $shc->{'IconLocation'} = $icon if -f $icon; $shc->{'Path'} = $prog; $shc->{'Arguments'} = $args; - $shc->{'ShowCmd'} = SW_SHOWMINNOACTIVE if $batgui; + $shc->{'ShowCmd'} = $batgui ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL; $shpath = $place; $shpath =~ s!\\!/!g; $shpath = '/'.$shpath unless $shpath =~ m!^/!; -- cgit v1.2.3