summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-09-12 21:01:16 +0000
committerNorbert Preining <preining@logic.at>2010-09-12 21:01:16 +0000
commit0a567d7b796a35f4bed70801ff3269d1dd0fc824 (patch)
tree3f981fe03ae30386e10f9c2de4302e9822ea11b3 /Master/tlpkg/dev
parent1aa0c3a9a577d0cc5d78fc42e4f640e8279d6d80 (diff)
add the patch for splitting desktop integration until we have
on-the-fly update of tlpdb options git-svn-id: svn://tug.org/texlive/trunk@19680 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/dev')
-rw-r--r--Master/tlpkg/dev/dev.split-desktop-integration.README18
-rw-r--r--Master/tlpkg/dev/dev.split-desktop-integration.patch349
2 files changed, 367 insertions, 0 deletions
diff --git a/Master/tlpkg/dev/dev.split-desktop-integration.README b/Master/tlpkg/dev/dev.split-desktop-integration.README
new file mode 100644
index 00000000000..ee3c6005306
--- /dev/null
+++ b/Master/tlpkg/dev/dev.split-desktop-integration.README
@@ -0,0 +1,18 @@
+split-desktop-integration
+
+I have implemented one additional installer option (and support in tlmgr)
+that splits the current
+ desktop_integration
+which currently relates to both shortcuts on the desktop and in the menu
+into two options:
+ desktop_integration
+ menu_integration
+that do one thing.
+
+Support is written for the installer (text, perltk, wizard), and tlmgr
+(changing the settings).
+
+Karl mentioned that both options should be here, but menu_integration
+should *not* be visible for the user at installation time, and should
+only be used by $portable.
+
diff --git a/Master/tlpkg/dev/dev.split-desktop-integration.patch b/Master/tlpkg/dev/dev.split-desktop-integration.patch
new file mode 100644
index 00000000000..4c308574422
--- /dev/null
+++ b/Master/tlpkg/dev/dev.split-desktop-integration.patch
@@ -0,0 +1,349 @@
+Index: install-tl
+===================================================================
+--- install-tl (revision 19656)
++++ install-tl (working copy)
+@@ -861,15 +861,13 @@
+ sub do_tlpdb_postactions {
+ info ("running package specific postactions\n");
+ # Run the post installation code in the postaction tlpsrc entries
+- # For now the option_desktop_integrations maps to both desktop
+- # and menu entries, but we can split that later
+ my $usedtlpdb = $vars{'from_dvd'} ? $tlpdb : $localtlpdb;
+ foreach my $package ($usedtlpdb->list_packages) {
+ &TeXLive::TLUtils::do_postaction("install",
+ $usedtlpdb->get_package($package),
+ $vars{'option_file_assocs'},
+ $vars{'option_desktop_integration'},
+- $vars{'option_desktop_integration'},
++ $vars{'option_menu_integration'},
+ $vars{'option_post_code'});
+ }
+ info ("finished with package specific postactions\n");
+@@ -1313,6 +1311,8 @@
+ && ($tlpdb->option("paper") eq "letter" ? 1 : 0);
+ $vars{'option_desktop_integration'} = $tlpdb->option("desktop_integration");
+ $vars{'option_desktop_integration'} = 1 if win32();
++ $vars{'option_menu_integration'} = $tlpdb->option("menu_integration");
++ $vars{'option_menu_integration'} = 1 if win32();
+ $vars{'option_path'} = $tlpdb->option("path");
+ $vars{'option_path'} = 0 if !defined($vars{'option_path'});
+ $vars{'option_path'} = 1 if win32();
+@@ -1496,6 +1496,7 @@
+ $vars{'option_path'} &&= !$vars{'portable'};
+ $vars{'option_file_assocs'} &&= !$vars{'portable'};
+ $vars{'option_desktop_integration'} &&= !$vars{'portable'};
++ $vars{'option_menu_integration'} &&= !$vars{'portable'};
+ }
+
+ sub prepare_installation {
+@@ -1543,6 +1544,7 @@
+ $localtlpdb->option ("backupdir", $vars{'option_backupdir'});
+ $localtlpdb->option ("create_formats", $vars{'option_fmt'} ? "1" : "0");
+ $localtlpdb->option ("desktop_integration", $vars{'option_desktop_integration'} ? "1" : "0");
++ $localtlpdb->option ("menu_integration", $vars{'option_menu_integration'} ? "1" : "0");
+ $localtlpdb->option ("file_assocs", $vars{'option_file_assocs'});
+ $localtlpdb->option ("post_code", $vars{'option_post_code'} ? "1" : "0");
+ $localtlpdb->option ("sys_bin", $vars{'option_sys_bin'});
+@@ -1635,6 +1637,7 @@
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "create_formats");
+ $vars{'option_desktop_integration'} = 1 if win32();
++ $vars{'option_menu_integration'} = 1 if win32();
+ $vars{'option_path'} =
+ $previoustlpdb->option_pkg("00texlive.installation",
+ "path");
+Index: tlpkg/TeXLive/TLConfig.pm
+===================================================================
+--- tlpkg/TeXLive/TLConfig.pm (revision 19656)
++++ tlpkg/TeXLive/TLConfig.pm (working copy)
+@@ -140,7 +140,10 @@
+ "Create formats on installation" ],
+ "desktop_integration" =>
+ [ "b", 1, "desktop_integration",
+- "Create shortcuts (menu and desktop) in postinst" ],
++ "Create shortcuts on the desktop in postinst" ],
++ "menu_integration" =>
++ [ "b", 1, "menu_integration",
++ "Create shortcuts in the Start menu in postinst" ],
+ "file_assocs" =>
+ [ "n:0..2", 1, "fileassocs",
+ "Change file associations in postinst" ],
+Index: tlpkg/TeXLive/TLMedia.pm
+===================================================================
+--- tlpkg/TeXLive/TLMedia.pm (revision 19656)
++++ tlpkg/TeXLive/TLMedia.pm (working copy)
+@@ -272,12 +272,10 @@
+ if (win32() && admin() && !$totlpdb->option("w32_multi_user")) {
+ non_admin();
+ }
+- # for now desktop_integration maps to both installation
+- # of desktop shortcuts and menu items, but we can split them later
+ &TeXLive::TLUtils::do_postaction("install", $tlpobj,
+ $totlpdb->option("file_assocs"),
+ $totlpdb->option("desktop_integration"),
+- $totlpdb->option("desktop_integration"),
++ $totlpdb->option("menu_integration"),
+ $totlpdb->option("post_code"));
+ }
+ }
+@@ -492,8 +490,8 @@
+ if (defined($opts{'nopostinstall'}) && $opts{'nopostinstall'}) {
+ &TeXLive::TLUtils::do_postaction("remove", $tlp,
+ 0, # option_file_assocs,
+- 0, # option_desktop_integration, menu part
+- 0, # option_desktop_integration, desktop part
++ 0, # option_desktop_integration
++ 0, # option_menu_integration
+ $localtlpdb->option("post_code"));
+ }
+ #
+@@ -523,12 +521,11 @@
+ # Run the post installation code in the postaction tlpsrc entries
+ # the postaction code part cannot be evaluated now since the
+ # files are already removed.
+- # Again, desktop integration maps to desktop and menu links
+ if (!$nopostinstall) {
+ &TeXLive::TLUtils::do_postaction("remove", $tlp,
+ $localtlpdb->option("file_assocs"),
+ $localtlpdb->option("desktop_integration"),
+- $localtlpdb->option("desktop_integration"),
++ $localtlpdb->option("menu_integration"),
+ 0);
+ }
+ }
+Index: tlpkg/installer/install-menu-wizard.pl
+===================================================================
+--- tlpkg/installer/install-menu-wizard.pl (revision 19656)
++++ tlpkg/installer/install-menu-wizard.pl (working copy)
+@@ -16,7 +16,7 @@
+ # for unix and windows. On W32 with admin privileges both @w32 list options
+ # are shown
+ my @unix_opts = qw/letter/;
+-my @w32_opts = qw/letter desktop_integration/;
++my @w32_opts = qw/letter desktop_integration menu_integration/;
+ my @w32_admin_opts = qw/w32_multi_user/;
+
+ my @opts_list = ();
+@@ -329,7 +329,8 @@
+
+ my %opts_to_str = (
+ "letter" => "Default paper size",
+- "desktop_integration" => "Add shortcuts to menu and desktop",
++ "desktop_integration" => "Add shortcuts on the desktop",
++ "menu_integration" => "Add shortcuts in the Start menu",
+ "file_assocs" => "Change file associations",
+ "path" => "Adjust PATH setting in registry",
+ "w32_multi_user" => "Installation for all users",
+@@ -357,9 +358,13 @@
+ # -variable => \$vars{"option_letter"});
+ #
+ # $opt_cb{"desktop_integration"} = $fmain->Checkbutton(
+-# -text => __("Add shortcuts to menu and desktop"),
++# -text => __("Add shortcuts on the desktop"),
+ ## -variable => \$vars{"option_desktop_integration"});
+ #
++# $opt_cb{"menu_integration"} = $fmain->Checkbutton(
++# -text => __("Add shortcuts in the Start menu"),
++## -variable => \$vars{"option_desktop_integration"});
++#
+ # $opt_cb{"file_assocs"} = $fmain->Checkbutton(
+ # -text => __('Change file associations'),
+ ## -variable => \$vars{"option_file_assocs"});
+Index: tlpkg/installer/install-menu-perltk.pl
+===================================================================
+--- tlpkg/installer/install-menu-perltk.pl (revision 19656)
++++ tlpkg/installer/install-menu-perltk.pl (working copy)
+@@ -78,6 +78,7 @@
+ my $fmtyesno = ( $vars{'option_fmt'} ? __("Yes") : __("No") );
+ my $srcyesno = ( $vars{'option_src'} ? __("Yes") : __("No") );
+ my $deskintyesno = ( $vars{'option_desktop_integration'} ? __("Yes") : __("No") );
++my $menuintyesno = ( $vars{'option_menu_integration'} ? __("Yes") : __("No") );
+ my $pathadjyesno = ( $vars{'option_path'} ? __("Yes") : __("No") );
+ my $fileassocyesno = $::fileassocdesc[$vars{'option_file_assocs'}];
+ my $editoryesno = ( $vars{'collection-texworks'} ? __("Yes") : __("No") );
+@@ -294,11 +295,17 @@
+
+ if ($::opt_all_options || win32()) {
+ $row++;
+- $fr->Label(-text => __('Add shortcuts to menu and desktop'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
++ $fr->Label(-text => __('Add shortcuts on the desktop'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-anchor => 'w', -textvariable => \$deskintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_desktop_integration'}, \$deskintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+
+ $row++;
++ $fr->Label(-text => __('Add shortcuts in Start menu'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
++ $fr->Label(-anchor => 'w', -textvariable => \$menuintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
++ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_menu_integration'}, \$menuintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
++
++ $row++;
++ $row++;
+ $fr->Label(-text => __('Change file associations'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-anchor => 'w', -textvariable => \$fileassocyesno)->grid(-row => $row, -column => 2, -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_file_assocs(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+Index: tlpkg/installer/install-menu-text.pl
+===================================================================
+--- tlpkg/installer/install-menu-text.pl (revision 19656)
++++ tlpkg/installer/install-menu-text.pl (working copy)
+@@ -711,6 +711,7 @@
+ my $b_fmt=button($vars{'option_fmt'});
+ my $b_letter=button($vars{'option_letter'});
+ my $b_deskint=button($vars{'option_desktop_integration'});
++ my $b_menuint=button($vars{'option_menu_integration'});
+ my $b_admin=button($vars{'option_w32_multi_user'});
+ my $b_addoneditor=button($vars{'collection-texworks'});
+ my $b_restricted=button($vars{'option_write18_restricted'});
+@@ -760,7 +761,8 @@
+ ;
+ }
+ if (win32() || $::opt_all_options) {
+- print " <M> install menu items, shortcuts, etc: $b_deskint\n";
++ print " <L> install desktop shortcuts: $b_deskint\n";
++ print " <M> install menu items: $b_menuint\n";
+ print " <N> update file associations: [$::fileassocdesc[$vars{'option_file_assocs'}]]\n";
+ if ($::opt_all_options || TeXLive::TLWinGoo::admin()) {
+ # if we are admin we allow normal user installation, too
+@@ -812,10 +814,14 @@
+ }
+ }
+ if (win32() || $::opt_all_options) {
+- if ("\u$answer" eq 'M') {
++ if ("\u$answer" eq 'L') {
+ toggle 'option_desktop_integration';
+ return $command{'self'};
+
++ } elsif ("\u$answer" eq 'M') {
++ toggle 'option_menu_integration';
++ return $command{'self'};
++
+ } elsif ("\u$answer" eq 'N') {
+ print "New value for file_assocs:\n";
+ print " 0 -- don't tweak the file associations\n";
+@@ -898,6 +904,7 @@
+ my $b_fmt=button($vars{'option_fmt'});
+ my $b_letter=button($vars{'option_letter'});
+ my $b_deskint=button($vars{'option_desktop_integration'});
++ my $b_menuint=button($vars{'option_menu_integration'});
+ my $b_admin=button($vars{'option_w32_multi_user'});
+ my $b_addoneditor=button($vars{'collection-texworks'});
+ my $b_restricted=button($vars{'option_write18_restricted'});
+@@ -1014,7 +1021,8 @@
+ }
+ if (win32()) {
+ print " $b_path adjust search path\n";
+- print " $b_deskint add menu items, shortcuts, etc.\n";
++ print " $b_deskint add desktop shortcuts\n";
++ print " $b_menuint add menu items\n";
+ print " [$vars{'option_file_assocs'}] update file associations\n";
+ if (admin()) {
+ print " $b_admin make installation available to all users\n";
+Index: tlpkg/installer/installer-options.txt
+===================================================================
+--- tlpkg/installer/installer-options.txt (revision 19656)
++++ tlpkg/installer/installer-options.txt (working copy)
+@@ -36,12 +36,20 @@
+
+ option_desktop_integration 1 w32 w32 w32
+ option("desktop_integration")
+- shortcuts etc
++ shortcuts on the desktop
+ currently effects w32 only
+ install-tl: sub do_tlpdb_postactions
+ TLMedia: remove_package, install_package
+
++option_menu_integration 1 w32 w32 w32
++ option("menu_integration")
++ shortcuts in the menu
++ currently effects w32 only
++ install-tl: sub do_tlpdb_postactions
++ TLMedia: remove_package, install_package
++
+ option_post_code 1
++option_post_code 1
+ option("post_code")
+ postaction code
+ install-tl: sub do_tlpdb_postactions
+Index: texmf/scripts/texlive/tlmgr.pl
+===================================================================
+--- texmf/scripts/texlive/tlmgr.pl (revision 19656)
++++ texmf/scripts/texlive/tlmgr.pl (working copy)
+@@ -2886,6 +2886,7 @@
+ for my $o (keys %{$localtlpdb->options}) {
+ # ignore some things which are win32 specific
+ next if ($o eq "desktop_integration" && !win32());
++ next if ($o eq "menu_integration" && !win32());
+ next if ($o eq "file_assocs" && !win32());
+ next if ($o eq "w32_multi_user" && !win32());
+ if (win32()) {
+@@ -3999,9 +4000,10 @@
+ @todo = @ARGV;
+ @todo = $localtlpdb->expand_dependencies("-only-arch", $localtlpdb, @todo);
+ }
+- if ($type =~ m/^shortcut$/i) {
++ if ($type =~ m/^(shortcut|desktop|menu)$/i) {
++ my $st = lc($1);
+ if (!win32()) {
+- tlwarn("action postaction shortcut only works on windows.\n");
++ tlwarn("action postaction $st only works on windows.\n");
+ return;
+ }
+ for my $p (@todo) {
+@@ -4010,7 +4012,18 @@
+ tlwarn("$p is not installed, ignoring it.\n");
+ } else {
+ # run all shortcut actions, desktop and menu integration
+- TeXLive::TLUtils::do_postaction($how, $tlp, 0, 1, 1, 0);
++ my @op = (1, 1);
++ if ($st eq "shortcut") {
++ @op = (1, 1);
++ } elsif ($st eq "menu") {
++ @op = (1, 0);
++ } elsif ($st eq "desktop") {
++ @op = (0, 1);
++ } else {
++ tlwarn("very strange, that should not happen: postaction type shortcut = ..$st..\n");
++ @op = (0, 0);
++ }
++ TeXLive::TLUtils::do_postaction($how, $tlp, 0, @op, 0);
+ }
+ }
+ } elsif ($type =~ m/^fileassoc$/i) {
+@@ -5418,12 +5431,15 @@
+
+
+ =head2 postaction [--w32mode=user|admin] [--fileassocmode=1|2] [--all]
+- [install|remove] [shortcut|fileassoc|script] [I<pkg>]...
++ [install|remove] [shortcut|menu|desktop|fileassoc|script] [I<pkg>]...
+
+ Carry out the postaction C<shortcut>, C<fileassoc>, or C<script> given
+ as the second required argument in install or remove mode (which is the
+ first required argument), for either the packages given on the command
+-line, or for all if C<--all> is given.
++line, or for all if C<--all> is given. Here C<shortcut> runs both the
++desktop and menu shortcut code, while C<menu> only installs/removes
++the menu entries, and C<desktop> only installs/removes the desktop
++shortcuts.
+
+ The option C<--w32mode> is C<user> all actions will only carried out in
+ the user accessible parts of the registry/filesystem, while the C<admin>
+Index: texmf/scripts/texlive/tlmgrgui.pl
+===================================================================
+--- texmf/scripts/texlive/tlmgrgui.pl (revision 19656)
++++ texmf/scripts/texlive/tlmgrgui.pl (working copy)
+@@ -1098,8 +1098,16 @@
+
+ if (win32()) {
+ push @config_set_l,
+- $back_config_set->Label(-text => __("Create shortcuts in menu and on desktop"), -anchor => "w");
++ $back_config_set->Label(-text => __("Create shortcuts in Start menu"), -anchor => "w");
+ push @config_set_m,
++ $back_config_set->Label(-textvariable => \$changeddefaults{"menu_integration"}{'display'});
++ push @config_set_r,
++ $back_config_set->Button(-text => __("Toggle"),
++ -command => sub { toggle_setting("menu_integration"); });
++
++ push @config_set_l,
++ $back_config_set->Label(-text => __("Create shortcuts on the desktop"), -anchor => "w");
++ push @config_set_m,
+ $back_config_set->Label(-textvariable => \$changeddefaults{"desktop_integration"}{'display'});
+ push @config_set_r,
+ $back_config_set->Button(-text => __("Toggle"),