summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-18 14:51:52 +0000
committerNorbert Preining <preining@logic.at>2008-05-18 14:51:52 +0000
commitfb23237500098e7be792a4dc278e9d015eb8f40a (patch)
tree1cce4d1cf4bcdbd55ec252ac30387c6e2ba59a7c
parentff9066ac4d536c55f150d9aa9c1eb974dcaf016f (diff)
move the addition of menu items/desktop icons on win32 to TLPostActions
defined removal actions to remove the stuff git-svn-id: svn://tug.org/texlive/trunk@8204 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/install-tl39
-rw-r--r--Master/tlpkg/TeXLive/TLPostActions.pm130
2 files changed, 128 insertions, 41 deletions
diff --git a/Master/install-tl b/Master/install-tl
index e2eebd0a57c..02fdbee30ba 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -983,45 +983,6 @@ operations might be disturbed.\n\n";
}
}
}
-
- if (win32) {
- add_desktop_shortcut(
- $vars{'TEXDIR'},
- 'TeXdoc',
- '', # $vars{'TEXDIR'}.'/tlpkg/doc/notes.ico',
- $vars{'TEXDIR'}.'/bin/win32/texdoctk.bat',
- '', # no args
- 'batgui', # any non-null value to hide command-prompt
- );
- add_desktop_shortcut(
- $vars{'TEXDIR'},
- 'PS_View',
- $vars{'TEXDIR'}.'/tlpkg/tlpsv/psv.exe', # icon, not prog!
- $vars{'TEXDIR'}.'/bin/win32/psv.bat',
- '',
- 'batgui',
- );
- add_menu_shortcut(
- 'TeXLive',
- 'TeXLive Manager',
- '', # $vars{'TEXDIR'}.'/tlpkg/doc/dummy.ico',
- $vars{'TEXDIR'}.'/bin/win32/tlmgr.bat',
- 'gui',
- 'batgui',
- );
- add_menu_shortcut(
- 'TeXLive',
- 'TeXLive Manual',
- '', # default pdf icon
- $vars{'TEXDIR'}.'/texmf-doc/doc/english/texlive-en/live.pdf',
- '',
- '',
- );
- }
-
- # old installer:
- #$config && texconfig-sys init
- #$config || echo "PLEASE RUN texconfig or texconfig-sys to make new formats."
}
diff --git a/Master/tlpkg/TeXLive/TLPostActions.pm b/Master/tlpkg/TeXLive/TLPostActions.pm
index a4bd75d2ead..6801f694e49 100644
--- a/Master/tlpkg/TeXLive/TLPostActions.pm
+++ b/Master/tlpkg/TeXLive/TLPostActions.pm
@@ -19,11 +19,16 @@ BEGIN {
use TeXLive::TLUtils qw(win32 mkdirhier copy);
+my $mainmenu = "TeX Live 2008";
+
our %PostInstall;
our %PostRemove;
-sub do_bin_xetex {
+#
+# bin-xetex
+#
+sub do_install_bin_xetex {
my ($texdir) = @_;
#
# bin-xetex installs font-config related stuff
@@ -48,8 +53,129 @@ sub do_bin_xetex {
system("fc-cache","-v");
}
}
-$PostInstall{"bin-xetex"} = \&do_bin_xetex;
+$PostInstall{"bin-xetex"} = \&do_install_bin_xetex;
+
+#
+# bin-texdoc
+#
+sub do_install_bin_texdoc {
+ my ($texdir) = @_;
+ if (win32()) {
+ add_desktop_shortcut(
+ $texdir,
+ 'TeXdoc GUI',
+ '', # $vars{'TEXDIR'}.'/tlpkg/doc/notes.ico', # the icon
+ $texdir.'/bin/win32/texdoctk.bat',
+ '', # no args
+ 'batgui', # any non-null value to hide command-prompt
+ );
+ add_menu_shortcut(
+ $mainmenu,
+ 'TeXdoc GUI',
+ '', # $vars{'TEXDIR'}.'/tlpkg/doc/notes.ico', # the icon
+ $texdir.'/bin/win32/texdoctk.bat',
+ '', # no args
+ 'batgui', # any non-null value to hide command-prompt
+ );
+ }
+}
+sub do_remove_bin_texdoc {
+ my ($texdir) = @_;
+ if (win32()) {
+ remove_desktop_shortcut('TeXdoc GUI');
+ remove_menu_shortcut('TeXdoc GUI');
+ }
+}
+$PostInstall{'bin-texdoc'} = \&do_install_bin_texdoc;
+$PostRemove{'bin-texdoc'} = \&do_remove_bin_texdoc;
+
+#
+# bin-tlpsv.win32
+#
+sub do_install_bin_tlpsv_win32 {
+ my ($texdir) = @_;
+ if (win32()) {
+ add_desktop_shortcut(
+ $texdir,
+ '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
+ );
+ }
+}
+sub do_remove_bin_tlpsv_win32 {
+ my ($texdir) = @_;
+ if (win32()) {
+ remove_desktop_shortcut('PS_View');
+ remove_menu_shortcut($mainmenu, 'PS_View');
+ }
+}
+$PostRemove{'bin-tlpsv.win32'} = \&do_remove_bin_tlpsv_win32;
+$PostInstall{'bin-tlpsv.win32'} = \&do_install_bin_tlpsv_win32;
+
+#
+# bin-texlive
+#
+sub do_install_bin_texlive {
+ my ($texdir) = @_;
+ if (win32()) {
+ add_menu_shortcut(
+ $mainmenu,
+ 'TeXLive Manager',
+ '', # $texdir.'/tlpkg/doc/dummy.ico',
+ $texdir.'/bin/win32/tlmgr.bat',
+ 'gui',
+ 'batgui',
+ );
+ }
+}
+sub do_remove_bin_texlive {
+ my ($texdir) = @_;
+ if (win32()) {
+ remove_menu_shortcut($mainmenu, 'TeXLive Manager');
+ }
+}
+$PostInstall{'bin-texlive'} = \&do_install_bin_texlive;
+$PostRemove{'bin-texlive'} = \&do_remove_bin_texlive;
+
+#
+# texlive-en
+#
+sub do_install_texlive_en {
+ my ($texdir) = @_;
+ if (win32()) {
+ add_menu_shortcut(
+ $mainmenu,
+ 'TeXLive Manual (en)',
+ '', # default pdf icon
+ $texdir.'/texmf-doc/doc/english/texlive-en/live.pdf',
+ '',
+ '',
+ );
+ }
+}
+sub do_remove_texlive_en {
+ my ($texdir) = @_;
+ if (win32()) {
+ remove_menu_shortcut($mainmenu,'TeXLive Manual (en)');
+ }
+}
+$PostInstall{'texlive-en'} = \&do_install_texlive_en;
+$PostRemove{'texlive-en'} = \&do_remove_texlive_en;
+#
+# FROM HERE ON ONLY DISABLED POST INSTALL AND REMOVE ACTIONS!!!!!!!
+#
# disabled
sub do_bin_xdvi {