From 10cf54d888d3329dbb08d5fc0b0e1766befd1192 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 14 Oct 2010 17:00:01 +0000 Subject: update some stuff I forgot to commit since ages, no idea if it is actually necessary for now git-svn-id: svn://tug.org/texlive/trunk@20098 c570f23f-e606-0410-a88d-b1316a301751 --- .../tlpkg/dev/dev.split-desktop-integration.patch | 333 +++------------------ .../dev/dev.update-tlpdb-option-on-the-fly.README | 21 ++ .../dev/dev.update-tlpdb-option-on-the-fly.patch | 56 ++++ 3 files changed, 112 insertions(+), 298 deletions(-) create mode 100644 Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.README create mode 100644 Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.patch (limited to 'Master/tlpkg/dev') diff --git a/Master/tlpkg/dev/dev.split-desktop-integration.patch b/Master/tlpkg/dev/dev.split-desktop-integration.patch index 4c308574422..3020684ffea 100644 --- a/Master/tlpkg/dev/dev.split-desktop-integration.patch +++ b/Master/tlpkg/dev/dev.split-desktop-integration.patch @@ -1,6 +1,6 @@ Index: install-tl =================================================================== ---- install-tl (revision 19656) +--- install-tl (revision 19696) +++ install-tl (working copy) @@ -861,15 +861,13 @@ sub do_tlpdb_postactions { @@ -13,22 +13,23 @@ Index: install-tl &TeXLive::TLUtils::do_postaction("install", $usedtlpdb->get_package($package), $vars{'option_file_assocs'}, ++ $vars{'option_menu_integration'}, $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 @@ +@@ -1313,6 +1311,9 @@ && ($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(); ++ # we unconditionally set the menu integration, this will be done in all ++ # cases but portable use, where we sanitize it away ++ $vars{'option_menu_integration'} = 1; $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 @@ +@@ -1496,6 +1497,7 @@ $vars{'option_path'} &&= !$vars{'portable'}; $vars{'option_file_assocs'} &&= !$vars{'portable'}; $vars{'option_desktop_integration'} &&= !$vars{'portable'}; @@ -36,14 +37,6 @@ Index: install-tl } 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"); @@ -52,298 +45,42 @@ Index: install-tl $vars{'option_path'} = $previoustlpdb->option_pkg("00texlive.installation", "path"); +Index: texmf/scripts/texlive/tlmgrgui.pl +=================================================================== +--- texmf/scripts/texlive/tlmgrgui.pl (revision 19696) ++++ texmf/scripts/texlive/tlmgrgui.pl (working copy) +@@ -1098,7 +1098,7 @@ + + 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 on the desktop"), -anchor => "w"); + push @config_set_m, + $back_config_set->Label(-textvariable => \$changeddefaults{"desktop_integration"}{'display'}); + push @config_set_r, +Index: texmf/scripts/texlive/NEWS +=================================================================== +--- texmf/scripts/texlive/NEWS (revision 19696) ++++ texmf/scripts/texlive/NEWS (working copy) +@@ -6,6 +6,8 @@ +
  • set LESS='-R' and unset LESSOPEN and LESSPIPE in the environment + before calling pod2usage. +
  • don't load the remote db if tlmgr update is called without arguments ++
  • menu shortcuts are installed unconditionally, the desktop_integration ++ option only controls shortcuts on the desktop (W32) + + tlmgr rev 19414 (TeX Live 2010 Release Version) + Index: tlpkg/TeXLive/TLConfig.pm =================================================================== ---- tlpkg/TeXLive/TLConfig.pm (revision 19656) +--- tlpkg/TeXLive/TLConfig.pm (revision 19696) +++ tlpkg/TeXLive/TLConfig.pm (working copy) -@@ -140,7 +140,10 @@ +@@ -140,7 +140,7 @@ "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 " install menu items, shortcuts, etc: $b_deskint\n"; -+ print " install desktop shortcuts: $b_deskint\n"; -+ print " install menu items: $b_menuint\n"; - print " 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]... -+ [install|remove] [shortcut|menu|desktop|fileassoc|script] [I]... - - Carry out the postaction C, C, or C