diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2018-09-01 20:43:37 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2018-09-01 20:43:37 +0000 |
commit | 4a2f96d8d387cc9311743a067e2c4f80b1b55a78 (patch) | |
tree | b7d28f99551b5554c08d79bd38ab2423ad899801 /Master/tlpkg | |
parent | 7e8b9ac66a032a70bd18c76d8446d698b58e9a4b (diff) |
Localization tcl installer; wrapper scripts
git-svn-id: svn://tug.org/texlive/trunk@48532 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-messages | 18 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-tl-gui.tcl | 336 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-tl-windows.cmd | 207 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-tl.sh | 112 | ||||
-rw-r--r-- | Master/tlpkg/translations/nl.po | 321 |
5 files changed, 822 insertions, 172 deletions
diff --git a/Master/tlpkg/bin/tl-update-messages b/Master/tlpkg/bin/tl-update-messages index b243dd4c74c..879059eb0de 100755 --- a/Master/tlpkg/bin/tl-update-messages +++ b/Master/tlpkg/bin/tl-update-messages @@ -5,6 +5,17 @@ # update the master messages.pot catalog and merge the result into the # respective .po files. +# notes on transition to tcl/tk frontend + +# Until the 2019 pretest stage we use a combined message catalog. + + +# Afterwards, we drop the perl input files and use tcl- rather than +# perl syntax for the temporary file with short descriptions. + +# For tcl, all .po files are converted to tcl-compatible .msg +# files, using the msgfmt utility. + mydir=`cd \`dirname $0\` && /bin/pwd` Master=`cd $mydir/../.. && /bin/pwd` transdir=$Master/tlpkg/translations @@ -14,18 +25,20 @@ cd $Master || exit 1 cp $transdir/messages.pot $transdir/messages.prev sed -n 's/^shortdesc \(.*\)/__("\1");/p' \ tlpkg/tlpsrc/scheme-*.tlpsrc tlpkg/tlpsrc/collection-*.tlpsrc >$tmpfile +cat install-tl >>$tmpfile +# rely on file extensions for source language identification xgettext -o tlpkg/translations/messages.pot \ - -L Perl \ --copyright-holder="TeX Live Team" \ --msgid-bugs-address=tex-live@tug.org \ --package-version=2010 \ --package-name="TeX Live" \ -k__ -k\$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -k \ - install-tl \ tlpkg/installer/tracked-install.pl \ tlpkg/installer/install-menu-wizard.pl \ tlpkg/installer/install-menu-perltk.pl \ texmf-dist/scripts/texlive/tlmgrgui.pl \ + tlpkg/installer/install-tl-gui.tcl \ + texmf-dist/scripts/tlshell/tlshell.tcl \ $tmpfile rm $tmpfile @@ -47,6 +60,7 @@ rm -f $tmpa $tmpb messages.prev for i in *.po ; do printf "$i " msgmerge --backup=none --no-fuzzy-matching --update $i messages.pot + msgfmt --tcl -d . -l ${i%.po} $i done exit $? diff --git a/Master/tlpkg/installer/install-tl-gui.tcl b/Master/tlpkg/installer/install-tl-gui.tcl index a50b394128b..fec4e1269e0 100755 --- a/Master/tlpkg/installer/install-tl-gui.tcl +++ b/Master/tlpkg/installer/install-tl-gui.tcl @@ -55,8 +55,8 @@ font configure titlefont -weight bold \ #font configure it_font -slant italic # string representation of booleans -proc yesno {b} { - return [expr {$b ? "Yes" : "No"}] +proc yes_no {b} { + return [expr {$b ? [__"Yes"] : [__ "No"]}] } # default foreground color and disabled foreground color @@ -91,10 +91,43 @@ set ::instroot [file normalize [info script]] set ::instroot [file dirname [file dirname [file dirname $::instroot]]] # localization support +# tcl 8.5 observes LC_ALL on linux, LANG on Mac OS. +# so let the shell wrapper handle a language option. +# for 8.5, locale setting from within tcl may not work. + +# exception: windows, for which there is a bundled 8.6. +# consult registry for default locale if LANG is not set. +# The wrapper already does this, but here we do it again +# in case company policy blocked reg.exe. + +if {$::tcl_platform(platform) eq "windows"} { + if {! [info exists ::env(LANG)] || $::env(LANG) eq ""} { + if {! [catch {package require registry}]} { + set regpath [join {HKEY_LOCAL_MACHINE system currentcontrolset + control nls language} "\\"] + if {! [catch {registry get $regpath "Installlanguage"} lcode]} { + set regpath [join {HKEY_CLASSES_ROOT mime database rfc1766} "\\"] + if {! [catch {registry get $regpath $lcode} lng]} { + set l [string first ";" $lng] + if {$l > 0} { + incr l -1 + set lng [string range $lng 0 $l] + } + set ::env(LANG) $lng + # tk_messageBox -message "Language $lng in registry found" + } + } + } + } +} + +# inside tcl, just load the message catalogs (all languages) package require msgcat namespace import msgcat::mc ::msgcat::mcload [file join $::instroot "tlpkg" "translations"] +proc __ {s args} {return [::msgcat::mc $s {*}$args]} + set ::perlbin "perl" if {$::tcl_platform(platform) eq "windows"} { set ::perlbin "${::instroot}/tlpkg/tlperl/bin/wperl.exe" @@ -138,7 +171,7 @@ proc dblog {s} { } # dummy translation function -#proc mc {fmt args} {return [format $fmt {*}$args]} +#proc _ {fmt args} {return [format $fmt {*}$args]} # what exit procs do we need? # - plain error exit with messagebox and stacktrace @@ -148,7 +181,7 @@ proc dblog {s} { # is closing the pipe $::inst guaranteed to kill perl? It should be proc err_exit {{mess ""}} { - if {$mess eq ""} {set mess "Error"} + if {$mess eq ""} {set mess [__ "Error"]} append mess "\n" [get_stacktrace] tk_messageBox -icon error -message $mess # kill perl process, just in case @@ -162,11 +195,59 @@ proc err_exit {{mess ""}} { exit } ; # err_exit +proc maybe_print_welcome {} { + # if the last non-empty line was "All done", then installation is completed. + # otherwise, it was help output or an interrupted installation. + # we allow for spurious empty lines at the end of the backend output. + + set all_done 0 + for {set i [.log.tx count -lines 1.0 end]} {$i > 0} {incr i -1} { + set l [.log.tx get ${i}.0 ${i}.end] + if {$l ne ""} { + puts $l + if {[string range $l 0 11] eq "Installed on"} { + set all_done 1 + } + break + } + } + if {!$all_done} return + # need TEXDIR and this_platform in case of profile install + if {! [info exists ::vars(this_platform)] || \ + ! [info exists ::vars(TEXDIR)]} { + if [regexp {^Installed on platform (.*) at (.*)$} $l m p r] { + set ::vars(this_platform) $p + set ::vars(TEXDIR) $r + } else { + set ::vars(this_platform) "PLATFORM" + set ::vars(TEXDIR) "ROOT" + } + } + + .log.tx configure -state normal + .log.tx tag configure center -justify center + .log.tx delete ${i}.0 end + .log.tx insert end "\n\n" + .log.tx insert end [__ "Welcome to TeX Live!"] center + .log.tx insert end "\n\n" + # tags appear to interfere with --/::msgcat::mc !?! + set s [__ "See %s/index.html for links to documentation.\nThe TeX Live web site (http://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at http://tug.org/usergroups.html." $::vars(TEXDIR)] + .log.tx insert end $s center + if {$::tcl_platform(platform) ne "windows"} { + .log.tx insert end "\n\n" + set s [__ "Add %s/texmf-dist/doc/man to MANPATH.\nAdd %s/texmf-dist/doc/info to INFOPATH.\nMost importantly, add %s/bin/%s\nto your PATH for current and future sessions." $::vars(TEXDIR) $::vars(TEXDIR) $::vars(TEXDIR) $::vars(this_platform)] + .log.tx insert end $s center + } + .log.tx insert end "\n" + .log.tx yview moveto 1 + if {$::tcl_platform(os) ne "Darwin"} {.log.tx configure -state disabled} +} + # regular read_line proc read_line {} { if [catch {chan gets $::inst l} len] { # catch [chan close $::inst] - err_exit "Error while reading from Perl backend" + err_exit [__ "Error while reading from Perl backend"] } elseif {$len < 0} { # catch [chan close $::inst] return [list -1 ""] @@ -178,7 +259,7 @@ proc read_line {} { proc read_line_no_eof {} { set ll [read_line] if {[lindex $ll 0] < 0} { - log_exit "Unexpected closed backend" + log_exit [__ "Unexpected closed backend"] } set l [lindex $ll 1] # TODO: test under debug mode @@ -193,9 +274,9 @@ proc read_line_cb {} { catch {chan close $::inst} # note. the right way to terminate is terminating the GUI shell. # This closes stdin of the child - # puts stderr "read_line_cb: pipe no longer readable" .close state !disabled if [winfo exists .abort] {.abort state disabled} + maybe_print_welcome } elseif {$len >= 0} { # regular output .log.tx configure -state normal @@ -267,6 +348,7 @@ proc place_dlg {wnd {p "."}} { proc end_dlg {ans wnd {p "."}} { set ::dialog_ans $ans raise $p + wm withdraw $wnd destroy $wnd } ; # end_dlg @@ -287,9 +369,9 @@ proc make_splash {} { # wallpaper pack [ttk::frame .bg -padding 3] -fill both -expand 1 - ppack [ttk::label .text -text "TeX Live Installer" \ + ppack [ttk::label .text -text [__ "TeX Live Installer"] \ -font bigfont] -in .bg - ppack [ttk::label .loading -text "Loading..."] -in .bg + ppack [ttk::label .loading -text [__ "Loading..."]] -in .bg wm state . normal wm attributes . -topmost @@ -322,10 +404,10 @@ proc show_log {{do_abort 0}} { .log.tx yview moveto 1 pack [ttk::frame .bottom] -in .bg -side bottom -fill x - ttk::button .close -text "close" -command exit + ttk::button .close -text [__ "Close"] -command exit ppack .close -in .bottom -side right; # -anchor e if $do_abort { - ttk::button .abort -text "abort" \ + ttk::button .abort -text [__ "Cancel"] \ -command {catch {chan close $::inst}; exit} ppack .abort -in .bottom -side right } @@ -406,7 +488,7 @@ if {$::tcl_platform(platform) ne "windows"} { proc choose_dir {initdir {parent .}} { create_dlg .browser $parent - wm title .browser "Browse..." + wm title .browser [__ "Browse..."] # wallpaper pack [ttk::frame .browser.bg -padding 3] -fill both -expand 1 @@ -439,9 +521,9 @@ if {$::tcl_platform(platform) ne "windows"} { # ok and cancel buttons pack [ttk::frame .browser.fr1] -in .browser.bg -fill x -expand 1 - ppack [ttk::button .browser.ok -text "Ok"] \ + ppack [ttk::button .browser.ok -text [__ "Ok"]] \ -in .browser.fr1 -side right - ppack [ttk::button .browser.cancel -text "Cancel"] \ + ppack [ttk::button .browser.cancel -text [__ "Cancel"]] \ -in .browser.fr1 -side right .browser.ok configure -command { set ::dialog_ans [.browser.tree focus] @@ -500,7 +582,7 @@ proc dirbrowser2widget {w} { set retval [choose_dir $retval [winfo parent $w]] } else { set retval [tk_chooseDirectory \ - -initialdir $retval -title [mc "select or type"]] + -initialdir $retval -title [__ "Select or type"]] } if {$retval eq ""} { return 0 @@ -532,7 +614,7 @@ proc update_full_path {} { chan flush $::inst if {[read_line_no_eof] eq "0"} { .tltd.path_l configure -text \ - [mc "Cannot be created or cannot be written to"] \ + [__ "Cannot be created or cannot be written to"] \ -foreground red .tltd.ok_b state disabled } else { @@ -544,23 +626,23 @@ proc update_full_path {} { proc edit_name {} { create_dlg .tled .tltd - wm title .tled [mc "Directory name..."] + wm title .tled [__ "Directory name..."] if $::plain_unix {wm attributes .tled -type dialog} # wallpaper pack [ttk::frame .tled.bg -padding 3] -fill both -expand 1 # widgets - ttk::label .tled.l -text [mc "Change name (slashes not allowed)"] + ttk::label .tled.l -text [__ "Change name (slashes not allowed)"] pack .tled.l -in .tled.bg -padx 5 -pady 5 ttk::entry .tled.e -width 20 -state normal pack .tled.e -in .tled.bg -pady 5 .tled.e insert 0 [.tltd.name_l cget -text] # now frame with ok and cancel buttons pack [ttk::frame .tled.buttons] -in .tled.bg -fill x -expand 1 - ttk::button .tled.ok_b -text [mc "Ok"] -command { + ttk::button .tled.ok_b -text [__ "Ok"] -command { if [regexp {[\\/]} [.tled.e get]] { - tk_messageBox -type ok -icon error -message [mc "No slashes allowed"] + tk_messageBox -type ok -icon error -message [__ "No slashes allowed"] } else { .tltd.name_l configure -text [.tled.e get] update_full_path @@ -568,7 +650,7 @@ proc edit_name {} { } } ppack .tled.ok_b -in .tled.buttons -side right -padx 5 -pady 5 - ttk::button .tled.q_b -text [mc "Cancel"] -command {destroy .tled} + ttk::button .tled.q_b -text [__ "Cancel"] -command {destroy .tled} ppack .tled.q_b -in .tled.buttons -side right -padx 5 -pady 5 place_dlg .tled .tltd @@ -578,8 +660,8 @@ proc toggle_rel {} { if {[.tltd.rel_l cget -text] ne ""} { set ans \ [tk_messageBox -message \ - "TL release component highly recommended!\nAre you sure?" \ - -title "Warning" \ + [__ "TL release component highly recommended!\nAre you sure?"] \ + -title [__ "Warning"] \ -type yesno \ -default no] if {$ans eq no} { @@ -621,7 +703,7 @@ proc texdir_setup {} { ### widgets ### create_dlg .tltd . - wm title .tltd "Installation root" + wm title .tltd [__ "Installation root"] # wallpaper pack [ttk::frame .tltd.bg -padding 3] -expand 1 -fill both @@ -647,12 +729,12 @@ proc texdir_setup {} { -in .tltd.fr1 -row $rw -column 4 # corresponding buttons incr rw - pgrid [ttk::button .tltd.prefix_b -text [mc "Change"] \ - -command {if [dirbrowser2widget .tltd.prefix_l] update_full_path}] \ + pgrid [ttk::button .tltd.prefix_b -text [__ "Change"] \ + -command {if [dirbrowser2widget .tltd.prefix_l] update_full_path}] \ -in .tltd.fr1 -row $rw -column 0 - pgrid [ttk::button .tltd.name_b -text [mc "Change"] -command edit_name] \ + pgrid [ttk::button .tltd.name_b -text [__ "Change"] -command edit_name] \ -in .tltd.fr1 -row $rw -column 2 - pgrid [ttk::button .tltd.rel_b -text [mc "Toggle year"] \ + pgrid [ttk::button .tltd.rel_b -text [__ "Toggle year"] \ -command toggle_rel] \ -in .tltd.fr1 -row $rw -column 4 @@ -660,15 +742,15 @@ proc texdir_setup {} { if {$::tcl_platform(platform) eq "windows"} { ttk::label .tltd.loc -anchor w .tltd.loc configure -text \ - [mc "Localized directory names will be replaced by their real names"] + [__ "Localized directory names will be replaced by their real names"] ppack .tltd.loc -in .tltd.bg -fill x -expand 1 } # ok/cancel buttons pack [ttk::frame .tltd.frbt] -in .tltd.bg -pady [list 10 0] -fill x -expand 1 - ttk::button .tltd.ok_b -text [mc "Ok"] -command commit_root + ttk::button .tltd.ok_b -text [__ "Ok"] -command commit_root ppack .tltd.ok_b -in .tltd.frbt -side right - ttk::button .tltd.cancel_b -text [mc "Cancel"] \ + ttk::button .tltd.cancel_b -text [__ "Cancel"] \ -command {destroy .tltd} ppack .tltd.cancel_b -in .tltd.frbt -side right @@ -736,7 +818,8 @@ proc edit_dir {d} { set ev "\$HOME" set xpl $::env(HOME) } - ppack [ttk::label .td.tilde -text "'~' equals $ev, e.g. $xpl"] \ + ppack [ttk::label .td.tilde \ + -text [__ "'~' equals %s, e.g. %s" $ev $xpl]] \ -in .td.bg -anchor w } @@ -747,11 +830,12 @@ proc edit_dir {d} { pack [ttk::frame .td.f] -fill x -expand 1 # below, ensure that $v is evaluated while the interface is built: + # the variable won't be available to the button callback # quoted string rather than curly braces - ttk::button .td.ok -text "Ok" -command \ + ttk::button .td.ok -text [__ "Ok"] -command \ "set ::vars($d) [forward_slashify [.td.e get]]; end_dlg 1 .td ." ppack .td.ok -in .td.f -side right - ttk::button .td.cancel -text "Cancel" -command {end_dlg 0 .td .} + ttk::button .td.cancel -text [__ "Cancel"] -command {end_dlg 0 .td .} ppack .td.cancel -in .td.f -side right place_dlg .td . @@ -762,7 +846,7 @@ proc edit_dir {d} { proc toggle_port {} { set ::vars(instopt_portable) [expr {!$::vars(instopt_portable)}] - .dirportvl configure -text [yesno $::vars(instopt_portable)] + .dirportvl configure -text [yes_no $::vars(instopt_portable)] canonical_local if {$::vars(instopt_portable)} { set ::vars(TEXMFHOME) $::vars(TEXMFLOCAL) @@ -861,7 +945,7 @@ proc show_stats {} { # toggle platform in treeview widget, but not in underlying data proc toggle_bin {b} { if {$b eq $::vars(this_platform)} { - tk_messageBox -message "Cannot deselect own platform" + tk_messageBox -message [__ "Cannot deselect own platform"] return } set m [.tlbin.lst set $b "mk"] @@ -892,14 +976,14 @@ proc save_bin_selections {} { proc select_binaries {} { create_dlg .tlbin . - wm title .tlbin "Binaries" + wm title .tlbin [__ "Binaries"] # wallpaper pack [ttk::frame .tlbin.bg -padding 3] -expand 1 -fill both set max_width 0 foreach b [array names ::bin_descs] { - set bl [font measure TkTextFont $::bin_descs($b)] + set bl [font measure TkTextFont [__ $::bin_descs($b)]] if {$bl > $max_width} {set max_width $bl} } incr max_width 10 @@ -916,7 +1000,7 @@ proc select_binaries {} { foreach b [array names ::bin_descs] { set bb "binary_$b" .tlbin.lst insert {} end -id $b -values \ - [list [mark_sym $::vars($bb)] $::bin_descs($b)] + [list [mark_sym $::vars($bb)] [__ $::bin_descs($b)]] } ppack .tlbin.lst -in .tlbin.binsf -side left -expand 1 -fill both ppack .tlbin.binsc -in .tlbin.binsf -side right -expand 1 -fill y @@ -927,10 +1011,10 @@ proc select_binaries {} { # ok, cancel buttons pack [ttk::frame .tlbin.buts] -in .tlbin.bg -expand 1 -fill x - ttk::button .tlbin.ok -text "Ok" -command \ + ttk::button .tlbin.ok -text [__ "Ok"] -command \ {save_bin_selections; update_vars; end_dlg 1 .tlbin .} ppack .tlbin.ok -in .tlbin.buts -side right - ttk::button .tlbin.cancel -text "Cancel" -command {end_dlg 0 .tlbin .} + ttk::button .tlbin.cancel -text [__ "Cancel"] -command {end_dlg 0 .tlbin .} ppack .tlbin.cancel -in .tlbin.buts -side right place_dlg .tlbin . @@ -944,7 +1028,7 @@ proc select_binaries {} { proc select_scheme {} { create_dlg .tlschm . - wm title .tlschm "Schemes" + wm title .tlschm [__ "Schemes"] # wallpaper pack [ttk::frame .tlschm.bg -padding 3] -fill both -expand 1 @@ -960,12 +1044,12 @@ proc select_scheme {} { .tlschm.lst column "desc" -width $max_width -stretch 1 ppack .tlschm.lst -in .tlschm.bg -fill x -expand 1 foreach s $::schemes_order { - .tlschm.lst insert {} end -id $s -values [list $::scheme_descs($s)] + .tlschm.lst insert {} end -id $s -values [list [__ $::scheme_descs($s)]] } # we already made sure that $::vars(selected_scheme) has a valid value .tlschm.lst selection set [list $::vars(selected_scheme)] pack [ttk::frame .tlschm.buts] -in .tlschm.bg -expand 1 -fill x - ttk::button .tlschm.ok -text "Ok" -command { + ttk::button .tlschm.ok -text [__ "Ok"] -command { # tree selection is a list: set ::vars(selected_scheme) [lindex [.tlschm.lst selection] 0] foreach v [array names ::vars] { @@ -982,7 +1066,7 @@ proc select_scheme {} { end_dlg 1 .tlschm . } ppack .tlschm.ok -in .tlschm.buts -side right - ttk::button .tlschm.cancel -text "Cancel" -command {end_dlg 0 .tlschm .} + ttk::button .tlschm.cancel -text [__ "Cancel"] -command {end_dlg 0 .tlschm .} ppack .tlschm.cancel -in .tlschm.buts -side right place_dlg .tlschm . @@ -1029,7 +1113,7 @@ proc select_collections {} { # buttons: select all, select none, ok, cancel # should some collections be excluded? Check install-menu-* code. create_dlg .tlcoll . - wm title .tlcoll "Collections" + wm title .tlcoll [__ "Collections"] # wallpaper pack [ttk::frame .tlcoll.bg -padding 3] @@ -1052,9 +1136,9 @@ proc select_collections {} { -height 20 -selectmode extended -yscrollcommand "${wgt}sc set" $wgt heading "mk" -text "" if {$t eq "lang"} { - $wgt heading "desc" -text "Languages" + $wgt heading "desc" -text [__ "Languages"] } else { - $wgt heading "desc" -text "Other collections" + $wgt heading "desc" -text [__ "Other collections"] } ttk::scrollbar ${wgt}sc -orient vertical -command "$wgt yview" @@ -1075,13 +1159,13 @@ proc select_collections {} { set wgt ".tlcoll.other" } $wgt insert {} end -id $c -values \ - [list [mark_sym $::vars($c)] $::coll_descs($c)] + [list [mark_sym $::vars($c)] [__ $::coll_descs($c)]] } # select none, select all, ok and cancel buttons pack [ttk::frame .tlcoll.butf] -fill x ttk::button .tlcoll.all \ - -text "Select all" \ + -text [__ "Select all"] \ -command \ {foreach wgt {.tlcoll.other .tlcoll.lang} { foreach c [$wgt children {}] {$wgt set $c "mk" [mark_sym 1]} @@ -1089,17 +1173,17 @@ proc select_collections {} { } ppack .tlcoll.all -in .tlcoll.butf -side left ttk::button .tlcoll.none \ - -text "Select none" \ + -text [__ "Select none"] \ -command \ {foreach wgt {.tlcoll.other .tlcoll.lang} { foreach c [$wgt children {}] {$wgt set $c "mk" [mark_sym 0]} } } ppack .tlcoll.none -in .tlcoll.butf -side left - ttk::button .tlcoll.ok -text "Ok" -command \ + ttk::button .tlcoll.ok -text [__ "Ok"] -command \ {save_coll_selections; end_dlg 1 .tlcoll .} ppack .tlcoll.ok -in .tlcoll.butf -side right - ttk::button .tlcoll.cancel -text "Cancel" -command {end_dlg 0 .tlcoll .} + ttk::button .tlcoll.cancel -text [__ "Cancel"] -command {end_dlg 0 .tlcoll .} ppack .tlcoll.cancel -in .tlcoll.butf -side right place_dlg .tlcoll . @@ -1179,7 +1263,7 @@ if {$::tcl_platform(platform) ne "windows"} { .edsyms.warn configure -text "" } else { .edsyms.warn configure -text \ - "Warning. Not all configured directories are writable!" + [__ "Warning. Not all configured directories are writable!"] } } @@ -1199,7 +1283,7 @@ if {$::tcl_platform(platform) ne "windows"} { proc edit_symlinks {} { create_dlg .edsyms . - wm title .edsyms "Symlinks" + wm title .edsyms [__ "Symlinks"] pack [ttk::frame .edsyms.bg -padding 3] -expand 1 -fill both set rw -1 @@ -1222,13 +1306,13 @@ if {$::tcl_platform(platform) ne "windows"} { }; # else leave empty bind .edsyms.${v}e <KeyRelease> {+check_sym_entries} # browse button - pgrid [ttk::button .edsyms.${v}br -text "browse..." -command \ + pgrid [ttk::button .edsyms.${v}br -text [__ "browse..."] -command \ "dirbrowser2widget .edsyms.${v}e; check_sym_entries"] \ -in .edsyms.fr0 -row $rw -column 3 } - .edsyms.binl configure -text "Binaries" - .edsyms.manl configure -text "Man pages" - .edsyms.infol configure -text "Info pages" + .edsyms.binl configure -text [__ "Binaries"] + .edsyms.manl configure -text [__ "Man pages"] + .edsyms.infol configure -text [__ "Info pages"] # warning about read-only target directories incr rw @@ -1237,9 +1321,9 @@ if {$::tcl_platform(platform) ne "windows"} { # ok, cancel pack [ttk::frame .edsyms.fr1] -expand 1 -fill both - ppack [ttk::button .edsyms.ok -text "ok" -command { + ppack [ttk::button .edsyms.ok -text [__ "Ok"] -command { commit_sym_entries; end_dlg 1 .edsyms .}] -in .edsyms.fr1 -side right - ppack [ttk::button .edsyms.cancel -text "Cancel" -command { + ppack [ttk::button .edsyms.cancel -text [__ "Cancel"] -command { end_dlg 0 .edsyms .}] -in .edsyms.fr1 -side right check_sym_entries @@ -1271,7 +1355,8 @@ proc run_menu {} { pack [ttk::frame .bg -padding 3] -fill both -expand 1 # title - ttk::label .title -text "TeX Live $::release_year Installer" -font titlefont + ttk::label .title -text [__ "TeX Live %s Installer" $::release_year] \ + -font titlefont pack .title -pady 10 -in .bg pack [ttk::separator .seph0 -orient horizontal] \ @@ -1280,13 +1365,13 @@ proc run_menu {} { # frame at bottom with install/quit buttons pack [ttk::frame .final] \ -in .bg -side bottom -pady [list 5 2] -fill x -expand 1 - ppack [ttk::button .install -text "Install" -command { + ppack [ttk::button .install -text [__ "Install"] -command { set ::menu_ans "startinst"}] -in .final -side right - ppack [ttk::button .quit -text [mc "Quit"] -command { + ppack [ttk::button .quit -text [__ "Quit"] -command { set ::out_log {} set ::menu_ans "no_inst"}] -in .final -side right if {!$::advanced} { - ppack [ttk::button .adv -text "Advanced" -command { + ppack [ttk::button .adv -text [__ "Advanced"] -command { set ::menu_ans "advanced"}] -in .final -side left } pack [ttk::separator .seph1 -orient horizontal] \ @@ -1310,48 +1395,52 @@ proc run_menu {} { if $::advanced { incr rw - pgrid [ttk::label .dirftitle -text "Root of installation" -font hfont] \ + pgrid [ttk::label .dirftitle -text [__ "Installation root"] \ + -font hfont] \ -in .dirf -row $rw -column 0 -columnspan 3 -sticky w - .dirftitle configure -text "Directories" + .dirftitle configure -text [__ "Directories"] } incr rw pgrid [ttk::label .tdirll] -in .dirf -row $rw -column 0 -sticky nw + set s [__ "Installation root"] if $::advanced { - .tdirll configure -text "TEXDIR:\nInstallation root" + .tdirll configure -text "TEXDIR:\n$s" } else { - .tdirll configure -text "Installation root" + .tdirll configure -text $s } pgrid [ttk::label .tdirvl -textvariable ::vars(TEXDIR)] \ -in .dirf -row $rw -column 1 -sticky nw - pgrid [ttk::button .tdirb -text "Change" -command texdir_setup] \ + pgrid [ttk::button .tdirb -text [__ "Change"] -command texdir_setup] \ -in .dirf -row $rw -column 2 -sticky new if $::advanced { incr rw - pgrid [ttk::label .tlocll -text "TEXMFLOCAL:\nLocal additions"] \ + set s [__ "Local additions"] + pgrid [ttk::label .tlocll -text "TEXMFLOCAL:\n$s"] \ -in .dirf -row $rw -column 0 -sticky nw pgrid [ttk::label .tlocvl -textvariable ::vars(TEXMFLOCAL)] \ -in .dirf -row $rw -column 1 -sticky nw - ttk::button .tlocb -text "Change" -command {edit_dir "TEXMFLOCAL"} + ttk::button .tlocb -text [__ "Change"] -command {edit_dir "TEXMFLOCAL"} pgrid .tlocb -in .dirf -row $rw -column 2 -sticky new incr rw - pgrid [ttk::label .thomell -text "TEXMFHOME:\nPer-user additions"] \ + set s [__ "Per-user additions"] + pgrid [ttk::label .thomell -text "TEXMFHOME:\n$s"] \ -in .dirf -row $rw -column 0 -sticky nw pgrid [ttk::label .thomevl -textvariable ::vars(TEXMFHOME)] \ -in .dirf -row $rw -column 1 -sticky nw - ttk::button .thomeb -text "Change" -command {edit_dir "TEXMFHOME"} + ttk::button .thomeb -text [__ "Change"] -command {edit_dir "TEXMFHOME"} pgrid .thomeb -in .dirf -row $rw -column 2 -sticky ne incr rw pgrid [ttk::label .dirportll \ - -text "Portable setup:\nMay reset TEXMFLOCAL\nand TEXMFHOME"] \ + -text [__ "Portable setup:\nMay reset TEXMFLOCAL\nand TEXMFHOME"]] \ -in .dirf -row $rw -column 0 -sticky nw pgrid [ttk::label .dirportvl] -in .dirf -row $rw -column 1 -sticky nw - pgrid [ttk::button .tportb -text "Toggle" -command toggle_port] \ + pgrid [ttk::button .tportb -text [__ "Toggle"] -command toggle_port] \ -in .dirf -row $rw -column 2 -sticky ne - .dirportvl configure -text [yesno $::vars(instopt_portable)] + .dirportvl configure -text [yes_no $::vars(instopt_portable)] # platforms section if {$::tcl_platform(platform) ne "windows"} { @@ -1360,7 +1449,7 @@ proc run_menu {} { set rw -1 incr rw - pgrid [ttk::label .binftitle -text "Platforms" -font hfont] \ + pgrid [ttk::label .binftitle -text [__ "Platforms"] -font hfont] \ -in .platf -row $rw -column 0 -columnspan 3 -sticky w # current platform @@ -1369,14 +1458,14 @@ proc run_menu {} { -text "Current platform:" pgrid .binl0 -in .platf -row $rw -column 0 -sticky w ttk::label .binl1 \ - -text "$::bin_descs($::vars(this_platform))" + -text [__ "$::bin_descs($::vars(this_platform))"] pgrid .binl1 -in .platf -row $rw -column 1 -sticky w # additional platforms incr rw - pgrid [ttk::label .binll -text "N. of additional platform(s):"] \ + pgrid [ttk::label .binll -text [__ "N. of additional platform(s):"]] \ -in .platf -row $rw -column 0 -sticky w pgrid [ttk::label .binlm] -in .platf -row $rw -column 1 -sticky w - pgrid [ttk::button .binb -text "Change" -command select_binaries] \ + pgrid [ttk::button .binb -text [__ "Change"] -command select_binaries] \ -in .platf -row $rw -column 2 -sticky e } @@ -1386,31 +1475,33 @@ proc run_menu {} { set rw -1 incr rw - pgrid [ttk::label .selftitle -text "Selections" -font hfont] \ + pgrid [ttk::label .selftitle -text [__ "Selections"] -font hfont] \ -in .selsf -row $rw -column 0 -columnspan 3 -sticky w # schemes incr rw - pgrid [ttk::label .schmll -text "Scheme:"] \ + pgrid [ttk::label .schmll -text [__ "Scheme:"]] \ -in .selsf -row $rw -column 0 -sticky w pgrid [ttk::label .schml -textvariable ::vars(selected_scheme)] \ -in .selsf -row $rw -column 1 -sticky w - pgrid [ttk::button .schmb -text "Change" -command select_scheme] \ + pgrid [ttk::button .schmb -text [__ "Change"] -command select_scheme] \ -in .selsf -row $rw -column 2 -sticky e # collections incr rw - pgrid [ttk::label .lcoll -text "N. of collections:"] \ + pgrid [ttk::label .lcoll -text [__ "N. of collections:"]] \ -in .selsf -row $rw -column 0 -sticky w pgrid [ttk::label .lcolv] -in .selsf -row $rw -column 1 -sticky w - pgrid [ttk::button .collb -text "Customize" -command select_collections] \ + pgrid [ttk::button .collb -text [__ "Customize"] \ + -command select_collections] \ -in .selsf -row $rw -column 2 -sticky e } # total size + # curf: current frame set curf [expr {$::advanced ? ".selsf" : ".dirf"}] incr rw - ttk::label .lsize -text "Disk space required (in MB):" + ttk::label .lsize -text [__ "Disk space required (in MB):"] ttk::label .size_req -textvariable ::vars(total_size) pgrid .lsize -in $curf -row $rw -column 0 -sticky e pgrid .size_req -in $curf -row $rw -column 1 -sticky w @@ -1429,7 +1520,7 @@ proc run_menu {} { set rw -1 incr rw - pgrid [ttk::label .optitle -text "Options" -font hfont] \ + pgrid [ttk::label .optitle -text [__ "Options"] -font hfont] \ -in $curf -row $rw -column 0 -columnspan 3 -sticky w } else { set curf .dirf @@ -1438,9 +1529,9 @@ proc run_menu {} { # instopt_letter set ::lpapers [list "A4" "letter"] incr rw - pgrid [ttk::label .paperl -text "Default paper size"] \ + pgrid [ttk::label .paperl -text [__ "Default paper size"]] \ -in $curf -row $rw -column 0 -sticky w - pgrid [ttk::combobox .paperb -values $::lpapers -width 8] \ + pgrid [ttk::combobox .paperb -values $::lpapers -state readonly -width 8] \ -in $curf -row $rw -column 1 -columnspan 2 -sticky e var2combo "instopt_letter" .paperb bind .paperb <<ComboboxSelected>> {+combo2var .paperb "instopt_letter"} @@ -1448,14 +1539,15 @@ proc run_menu {} { if $::advanced { # instopt_write18_restricted incr rw - pgrid [ttk::label .write18l -text "Allow restricted programs via write18"] \ + pgrid [ttk::label .write18l -text \ + [__ "Allow execution of restricted list of programs via \\write18"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w ttk::checkbutton .write18b -variable ::vars(instopt_write18_restricted) pgrid .write18b -in $curf -row $rw -column 2 -sticky e # tlpdbopt_create_formats incr rw - pgrid [ttk::label .formatsl -text "Create all format files"] \ + pgrid [ttk::label .formatsl -text [__ "Create all format files"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w ttk::checkbutton .formatsb -variable ::vars(tlpdbopt_create_formats) pgrid .formatsb -in $curf -row $rw -column 2 -sticky e @@ -1463,7 +1555,7 @@ proc run_menu {} { # tlpdbopt_install_docfiles if $::vars(doc_splitting_supported) { incr rw - pgrid [ttk::label .docl -text "Install font/macro doc tree"] \ + pgrid [ttk::label .docl -text [__ "Install font/macro doc tree"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w ttk::checkbutton .docb -variable ::vars(tlpdbopt_install_docfiles) \ -command {update_vars; show_stats} @@ -1473,7 +1565,7 @@ proc run_menu {} { # tlpdbopt_install_srcfiles if $::vars(src_splitting_supported) { incr rw - pgrid [ttk::label .srcl -text "Install font/macro source tree"] \ + pgrid [ttk::label .srcl -text [__ "Install font/macro source tree"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w ttk::checkbutton .srcb -variable ::vars(tlpdbopt_install_srcfiles) \ -command {update_vars; show_stats} @@ -1486,28 +1578,30 @@ proc run_menu {} { if $::advanced { # instopt_adjustpath incr rw - pgrid [ttk::label .pathl -text "Adjust searchpath"] \ + pgrid [ttk::label .pathl -text [__ "Adjust searchpath"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w ttk::checkbutton .pathb -variable ::vars(instopt_adjustpath) pgrid .pathb -in $curf -row $rw -column 2 -sticky e # tlpdbopt_desktop_integration - set ::desk_int [list "No shortcuts" "TeX Live menu" "Launcher entry"] + set ::desk_int \ + [list [__ "No shortcuts"] [__ "TeX Live menu"] [__ "Launcher entry"]] incr rw - pgrid [ttk::label .dkintl -text "Desktop integration"] \ + pgrid [ttk::label .dkintl -text [__ "Desktop integration"]] \ -in $curf -row $rw -column 0 -sticky w - pgrid [ttk::combobox .dkintb -values $::desk_int -width 20] \ + pgrid [ttk::combobox .dkintb -values $::desk_int -state readonly \ + -width 20] \ -in $curf -row $rw -column 1 -columnspan 2 -sticky e var2combo "tlpdbopt_desktop_integration" .dkintb bind .dkintb <<ComboboxSelected>> \ {+combo2var .dkintb "tlpdbopt_desktop_integration"} # tlpdbopt_file_assocs - set ::assoc [list "None" "Only new" "All"] + set ::assoc [list [__ "None"] [__ "Only new"] [__ "All"]] incr rw - pgrid [ttk::label .assocl -text "File associations"] \ + pgrid [ttk::label .assocl -text [__ "File associations"]] \ -in $curf -row $rw -column 0 -sticky w - pgrid [ttk::combobox .assocb -values $::assoc -width 12] \ + pgrid [ttk::combobox .assocb -values $::assoc -state readonly -width 12] \ -in $curf -row $rw -column 1 -columnspan 2 -sticky e var2combo "tlpdbopt_file_assocs" .assocb bind .assocb <<ComboboxSelected>> \ @@ -1516,7 +1610,7 @@ proc run_menu {} { # tlpdbopt_w32_multi_user incr rw - pgrid [ttk::label .adminl -text "Install for all users"] \ + pgrid [ttk::label .adminl -text [__ "Install for all users"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w ttk::checkbutton .adminb -variable ::vars(tlpdbopt_w32_multi_user) pgrid .adminb -in $curf -row $rw -column 2 -sticky e @@ -1543,13 +1637,14 @@ proc run_menu {} { # instopt_adjustpath, unix edition: symlinks # tlpdbopt_sys_[bin|info|man] incr rw - pgrid [ttk::label .pathl -text "create symlinks in standard directories"] \ + pgrid [ttk::label .pathl \ + -text [__ "create symlinks in standard directories"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w pgrid [ttk::checkbutton .pathb -variable ::vars(instopt_adjustpath)] \ -in $curf -row $rw -column 2 -sticky e dis_enable_symlink_option; # enable only if standard directories ok incr rw - pgrid [ttk::button .symspec -text "Specify directories" \ + pgrid [ttk::button .symspec -text [__ "Specify directories"] \ -command edit_symlinks] \ -in $curf -row $rw -column 1 -columnspan 2 -sticky e } @@ -1563,7 +1658,7 @@ proc run_menu {} { # final entry: instopt_adjustrepo incr rw pgrid [ttk::label .ctanl -text \ - "After install, set CTAN as source for package updates"] \ + [__ "After install, set CTAN as source for package updates"]] \ -in $curf -row $rw -column 0 -columnspan 2 -sticky w pgrid [ttk::checkbutton .ctanb -variable ::vars(instopt_adjustrepo)] \ -in $curf -row $rw -column 2 -sticky e @@ -1689,9 +1784,6 @@ proc read_menu_data {} { while 1 { set l [read_line_no_eof] if [regexp {^([^:]+): (.*)$} $l m k v] { - #if [info exists ::bin_descs($k)] { - # puts stderr "Duplicate key $k in binaries section" - #} set ::bin_descs($k) $v } elseif {$l eq "endbinaries"} { break @@ -1734,45 +1826,25 @@ proc run_installer {} { set ::out_log {} show_log 1; # 1: with abort button .close state disabled - # startinst: does not makes sense for a profile installation if $::did_gui { chan puts $::inst "startinst" write_vars } + # the backend was already running and needs no further encouragement - # - non-blocking i/o + # switch to non-blocking i/o chan configure $::inst -buffering line -blocking 0 chan event $::inst readable read_line_cb }; # run_installer proc main_prog {} { - # handle appropriate language command-line argument - # the windows batch wrapper sets LANG based on - # registry values unless it was already set - if [info exists ::env(LANG)] {catch {::msgcat::mclocale $::env(LANG)}} - set inx 0 - set perl_args [list] - while {$inx <= [llength $::argv]} { - if [regexp {^--?lang=(.*)$} [lindex $::argv $inx] m l] { - ::msgcat::mclocale $l - } elseif [regexp {^--?lang$} [lindex $::argv $inx]] { - incr inx - if {$inx >= [llength $::argv]} { - err_exit "lang parameter without value" - } - ::msgcat::mclocale [lindex $::argv $inx] - } else { - lappend ::perl_args [lindex $::argv $inx] - } - incr inx - } - wm title . [mc "TeX Live %s" "Installer"] + wm title . [__ "TeX Live Installer"] make_splash # start install-tl-[tcl] via a pipe set cmd [list ${::perlbin} "${::instroot}/install-tl" \ - "-from_ext_gui" {*}$perl_args] + "-from_ext_gui" {*}$::argv] show_time "opening pipe" if [catch {open "|[join $cmd " "] 2>@1" r+} ::inst] { # "2>@1" ok under Windows >= XP diff --git a/Master/tlpkg/installer/install-tl-windows.cmd b/Master/tlpkg/installer/install-tl-windows.cmd new file mode 100644 index 00000000000..b9ece1c5e87 --- /dev/null +++ b/Master/tlpkg/installer/install-tl-windows.cmd @@ -0,0 +1,207 @@ +@echo off +rem $Id: install-tl.bat 30369 2018-03-11 13:01:27Z siepo $ +rem Wrapper script to set up environment for installer +rem +rem Public domain. +rem Originally written 2009 by Tomasz M. Trzeciak. + +rem Localize environment changes +setlocal enableextensions enabledelayedexpansion + +rem check for version later than vista +for /f "usebackq tokens=2 delims=[]" %%I in (`ver`) do set ver_str=%%I +set ver_str=%ver_str:* =% +rem windows 9x, 2000, xp won't work, vista unsupported but may work +if %ver_str:~,2% == 4. goto tooold +if %ver_str:~,2% == 5. goto tooold +if %ver_str:~,3% == 6.0 ( +echo WARNING: Windows 7 is the earliest supported version. +echo TeX Live 2018 has not been tested on Windows Vista. +pause +) + +rem version of external perl, if any +set extperl=0 +for /f "usebackq tokens=2 delims='" %%a in (`perl -V:version 2^>NUL`) do ( + set extperl=%%a +) + +rem set instroot before %0 gets overwritten during argument processing +set instroot=%~dp0 + +rem while this file resides in tlpkg/installer: +rem alternately remove final backslash and filename part +rem to arrive at grandparent +rem retain final backslash +set instroot=%instroot:~,-1% +for %%J in (%instroot%) do set instroot=%%~dpJ +set instroot=%instroot:~,-1% +for %%J in (%instroot%) do set instroot=%%~dpJ + +set notcl=no +set tcl=yes +set args= +goto rebuildargs + +rem check for a gui- and lang arguments +rem handle them here and do not pass them on to perl or tcl. +rem cmd.exe converts '=' to a space: +rem '-parameter=value' becomes '-parameter value': two arguments + +rem code block for language argument +:dolang +shift +if "%0" == "" goto nomoreargs +set LANG=%0 +set LC_ALL= +goto rebuildargs + +rem code block for gui argument +:dogui +if x%1 == x ( +set tcl=yes +goto rebuildargs +) +if %1 == text ( +set tcl=no +shift +goto rebuildargs +) +if %1 == wizard ( +set tcl=yes +shift +goto rebuildargs +) +if %1 == perltk ( +set tcl=yes +shift +goto rebuildargs +) +if %1 == expert ( +set tcl=yes +shift +goto rebuildargs +) +if %1 == tcl ( +set tcl=yes +shift +goto rebuildargs +) + +rem loop for argument scanning +:rebuildargs +shift +if x%0 == x goto nomoreargs +set p=%0 +if %p% == --lang goto dolang +if %p% == -lang goto dolang + +if %p% == -print-platform set tcl=no +if %p% == --print-platform set tcl=no +if %p% == -version set tcl=no +if %p% == --version set tcl=no +if %p% == -no-gui ( +set notcl=yes +goto rebuildargs +) +if %p% == --no-gui ( +set notcl=yes +goto rebuildargs +) +if %p% == -gui goto dogui +if %p% == --gui goto dogui + +rem not a gui- or lang argument: copy to args string +if "%args%" == "" ( +set args=%p% +) else ( +set args=%args% %p% +) +goto rebuildargs +:nomoreargs + +set p= +if %notcl% == yes set tcl=no + +rem locale detection for tcl +rem the LANG environment variable should set the tcl default language. +rem Since reg.exe may be disabled by e.g. company policy, +rem tcl will yet consult the registry if LANG is not set, +rem although under some circumstances this may cause a long delay. +goto endreg +if %tcl% == no goto endreg +if not x%LANG% == x goto endreg +rem reg.exe runnable by user? +reg /? >nul 2>&1 +goto endreg +if errorlevel 1 goto endreg +for /f "skip=1 usebackq tokens=3 delims= " %%a in (`reg query hklm\system\currentcontrolset\control\nls\language /v Installlanguage`) do set lid=%%a +if errorlevel 1 goto endreg +for /f "skip=1 usebackq tokens=3 delims=; " %%a in (`reg query hkcr\mime\database\rfc1766 /v %lid%`) do set LANG=%%a +:endreg + +rem Check for tex directories on path and remove them. +rem Need to remove any double quotes from path +set path=%path:"=% +rem Break search path into dir list and rebuild w/o tex dirs. +set path="%path:;=" "%" +set newpath= +for /d %%I in (%path%) do ( +set ii=%%I +set ii=!ii:"=! +if not exist !ii!\pdftex.exe ( +if not exist !ii!pdftex.exe ( +set newpath=!newpath!;!ii! +) +) +) +set ii= +path %newpath% +if "%path:~,1%"==";" set path=%path:~1% +rem Use TL Perl +path=%instroot%tlpkg\tlperl\bin;%path% +set PERL5LIB=%instroot%tlpkg\tlperl\lib +rem for now, assume tcl/tk is on path + +rem Clean environment from other Perl variables +set PERL5OPT= +set PERLIO= +set PERLIO_DEBUG= +set PERLLIB= +set PERL5DB= +set PERL5DB_THREADED= +set PERL5SHELL= +set PERL_ALLOW_NON_IFS_LSP= +set PERL_DEBUG_MSTATS= +set PERL_DESTRUCT_LEVEL= +set PERL_DL_NONLAZY= +set PERL_ENCODING= +set PERL_HASH_SEED= +set PERL_HASH_SEED_DEBUG= +set PERL_ROOT= +set PERL_SIGNALS= +set PERL_UNICODE= +set errlev=0 + +rem Start installer +if %tcl% == yes ( +rem echo wish "%instroot%tlpkg\installer\install-tl-gui.tcl" -- %args% +rem pause +wish "%instroot%tlpkg\installer\install-tl-gui.tcl" -- %args% +) else ( +rem echo perl "%instroot%install-tl" %args% -no-gui +rem pause +perl "%instroot%install-tl" %args% -no-gui +) + +rem The nsis installer will need this: +if errorlevel 1 set errlev=1 +goto eoff + +:tooold +echo TeX Live does not run on this Windows version. +echo TeX Live is supported on Windows 7 and later. +goto eoff + +:eoff +endlocal diff --git a/Master/tlpkg/installer/install-tl.sh b/Master/tlpkg/installer/install-tl.sh new file mode 100755 index 00000000000..47bb03304dd --- /dev/null +++ b/Master/tlpkg/installer/install-tl.sh @@ -0,0 +1,112 @@ +#! /bin/sh + +# default: tcl gui or not +if test `uname -s` = Darwin; then + tcl=yes +else + tcl=no +fi +# are there reasons not to use the tcl gui? +notcl=no + +args='' + +unset wait_for_gui +unset wait_for_lang +unset gui_set + +# We need "$@ syntax because some paramters may contain spaces. +# In order to make use of this syntax we must pass along ALL parameters. +for p in "$@"; do + # TODO: sanitize $p; abort if necessary + case $p in + -tcl | --tcl) + if test $gui_set; then echo Gui set more than once; exit 1; fi + gui_set=1 + if test $wait_for_lang; then echo Language code expected; exit 1; fi + unset wait_for_gui + tcl=yes + ;; + -print-platform | --print-platform | -version | --version) + if test $wait_for_lang; then echo Language code expected; exit 1; fi + unset wait_for_gui + notcl=yes + ;; + -gui | --gui) + if test $gui_set; then echo Gui set more than once; exit 1; fi + gui_set=1 + if test $wait_for_lang; then echo Language code expected; exit 1; fi + tcl=yes + wait_for_gui=1 + ;; + --gui=* | -gui=*) + if test $gui_set; then echo Gui set more than once; exit 1; fi + gui_set=1 + if test $wait_for_lang; then echo Language code expected; exit 1; fi + if test $p = -gui=text -o $p = --gui=text; then + tcl=no + else + tcl=yes + fi + unset wait_for_gui + ;; + -no-gui | --no-gui) + if test $wait_for_lang; then echo Language code expected; exit 1; fi + unset wait_for_gui + notcl=yes + ;; + -lang | --lang) + if test $wait_for_lang; then echo Language code expected; exit 1; fi + unset wait_for_gui + wait_for_lang=1 + ;; + -lang=*) + if test $wait_for_lang; then echo Language code expected; exit 1; fi + unset wait_for_gui + LANG=$p + LANG=${LANG#-lang=} + ;; + --lang=*) + if test $wait_for_lang; then echo Language code expected; exit 1; fi + unset wait_for_gui + LANG=$p + LANG=${LANG#--lang=} + ;; + *) + if test $wait_for_gui; then + if test $p = text; then + tcl=no + else + tcl=yes + fi + unset wait_for_gui + fi + if test $wait_for_lang; then + LANG=$p + unset wait_for_lang + fi + ;; + esac +done +if test $notcl = yes; then + tcl=no +fi + +export LANG +LC_MESSAGES=$LANG +export LC_MESSAGES +unset LC_ALL + +# silence perl locale warnings +PERL_BADLANG=0 +export PERL_BADLANG + +# We can safely pass all original parameters to perl: +# In install-tl[.pl], from_ext_gui will overrule the gui parameter. +# The lang parameter will not come into play in either perl or tcl. + +if test "$tcl" = "yes"; then + exec wish `dirname $0`/install-tl-gui.tcl -- "$@" +else + exec perl `dirname $0`/../../install-tl "$@" +fi diff --git a/Master/tlpkg/translations/nl.po b/Master/tlpkg/translations/nl.po index 4c5b7df3c3b..0c34c1ac6d7 100644 --- a/Master/tlpkg/translations/nl.po +++ b/Master/tlpkg/translations/nl.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: TeX Live translation\n" "Report-Msgid-Bugs-To: tex-live@tug.org\n" -"POT-Creation-Date: 2018-08-08 02:24+0200\n" -"PO-Revision-Date: 2018-03-31 14:09+0200\n" +"POT-Creation-Date: 2018-08-28 18:23+0200\n" +"PO-Revision-Date: 2018-08-24 12:59+0200\n" "Last-Translator: Siep Kroonenberg <siepo@cybercomm.nl>\n" "Language-Team: TL Translation Team <tex-live@tug.org>\n" "Language: nl\n" @@ -11,40 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-SourceCharset: UTF-8\n" -"X-Generator: Poedit 2.0.4\n" - -#: install-tl:2455 -msgid "Welcome to TeX Live!" -msgstr "Welkom bij TeX Live!" - -#: install-tl:2458 -#, perl-format -msgid "" -"See %s/index.html for links to documentation.\n" -"The TeX Live web site (http://tug.org/texlive/) contains any updates and " -"corrections. TeX Live is a joint project of the TeX user groups around the " -"world; please consider supporting it by joining the group best for you. The " -"list of groups is available on the web at http://tug.org/usergroups.html." -msgstr "" -"Zie %s/index.html voor links naar documentatie.\n" -"De TeX Live web site (http://tug.org/texlive/) bevat\n" -"eventuele updates en correcties.\n" -"TeX Live is een gezamenlijk projekt van TeX gebruikersgroepen wereldwijd;\n" -"overweeg ondersteuning door lid te worden van zo'n groep.\n" -"De lijst van gebruikersgroepen staat op http://tug.org/usergroups.html." - -#: install-tl:2463 -#, perl-format -msgid "" -"Add %s/texmf-dist/doc/man to MANPATH.\n" -"Add %s/texmf-dist/doc/info to INFOPATH.\n" -"Most importantly, add %s/bin/%s\n" -"to your PATH for current and future sessions." -msgstr "" -"Voeg %s/texmf-dist/doc/man toe aan MANPATH.\n" -"Voeg %s/texmf-dist/doc/info toe aan INFOPATH.\n" -"En bovenal, voeg %s/bin/%s\n" -"toe aan PATH voor huidige en toekomstige sessies." +"X-Generator: Poedit 2.0.6\n" #: tlpkg/installer/tracked-install.pl:27 msgid "Installation process" @@ -73,6 +40,15 @@ msgstr "Installatie" #: texmf-dist/scripts/texlive/tlmgrgui.pl:2469 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2506 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2587 +#: tlpkg/installer/install-tl-gui.tcl:385 +#: tlpkg/installer/install-tl-gui.tcl:501 +#: tlpkg/installer/install-tl-gui.tcl:628 +#: tlpkg/installer/install-tl-gui.tcl:728 +#: tlpkg/installer/install-tl-gui.tcl:813 +#: tlpkg/installer/install-tl-gui.tcl:992 +#: tlpkg/installer/install-tl-gui.tcl:1044 +#: tlpkg/installer/install-tl-gui.tcl:1161 +#: tlpkg/installer/install-tl-gui.tcl:1301 msgid "Cancel" msgstr "Afbreken" @@ -86,6 +62,7 @@ msgstr "Sluit af" #: tlpkg/installer/install-menu-wizard.pl:41 #: tlpkg/installer/install-menu-perltk.pl:445 +#: tlpkg/installer/install-tl-gui.tcl:1507 msgid "Default paper size" msgstr "Standaard papier-formaat" @@ -100,7 +77,7 @@ msgstr "Maak TeX Live menu" #: texmf-dist/scripts/texlive/tlmgrgui.pl:1828 #: texmf-dist/scripts/texlive/tlmgrgui.pl:1832 msgid "Change file associations" -msgstr "Wijzig bestandstypen" +msgstr "Wijzig bestands-koppelingen" #: tlpkg/installer/install-menu-wizard.pl:44 #: tlpkg/installer/install-menu-perltk.pl:511 @@ -128,6 +105,7 @@ msgstr "TeX Live %s Installatie" #: tlpkg/installer/install-menu-perltk.pl:630 #: tlpkg/installer/install-menu-perltk.pl:676 #: texmf-dist/scripts/texlive/tlmgrgui.pl:544 +#: tlpkg/installer/install-tl-gui.tcl:1345 msgid "Quit" msgstr "Stoppen" @@ -294,6 +272,13 @@ msgstr "Bestemmings-folder" #: texmf-dist/scripts/texlive/tlmgrgui.pl:2433 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2438 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2443 +#: tlpkg/installer/install-tl-gui.tcl:707 +#: tlpkg/installer/install-tl-gui.tcl:710 +#: tlpkg/installer/install-tl-gui.tcl:1389 +#: tlpkg/installer/install-tl-gui.tcl:1399 +#: tlpkg/installer/install-tl-gui.tcl:1408 +#: tlpkg/installer/install-tl-gui.tcl:1443 +#: tlpkg/installer/install-tl-gui.tcl:1462 msgid "Change" msgstr "Wijzig" @@ -360,27 +345,32 @@ msgstr "Ja" #: texmf-dist/scripts/texlive/tlmgrgui.pl:700 #: texmf-dist/scripts/texlive/tlmgrgui.pl:1109 #: texmf-dist/scripts/texlive/tlmgrgui.pl:1730 +#: tlpkg/installer/install-tl-gui.tcl:59 msgid "No" msgstr "Nee" #: tlpkg/installer/install-menu-wizard.pl:604 #: texmf-dist/scripts/texlive/tlmgrgui.pl:456 +#: tlpkg/installer/install-tl-gui.tcl:1343 msgid "Install" msgstr "Installeren" #: tlpkg/installer/install-menu-perltk.pl:48 #: tlpkg/installer/install-menu-perltk.pl:1251 #: texmf-dist/scripts/texlive/tlmgrgui.pl:143 +#: tlpkg/installer/install-tl-gui.tcl:1575 msgid "None" msgstr "Geen" #: tlpkg/installer/install-menu-perltk.pl:49 #: texmf-dist/scripts/texlive/tlmgrgui.pl:144 +#: tlpkg/installer/install-tl-gui.tcl:1575 msgid "Only new" msgstr "Alleen nieuw" #: tlpkg/installer/install-menu-perltk.pl:50 #: texmf-dist/scripts/texlive/tlmgrgui.pl:145 +#: tlpkg/installer/install-tl-gui.tcl:1575 msgid "All" msgstr "Alle" @@ -394,14 +384,17 @@ msgid "letter" msgstr "letter" #: tlpkg/installer/install-menu-perltk.pl:55 +#: tlpkg/installer/install-tl-gui.tcl:1563 msgid "No shortcuts" msgstr "Geen TeX Live menu" #: tlpkg/installer/install-menu-perltk.pl:56 +#: tlpkg/installer/install-tl-gui.tcl:1563 msgid "TeX Live menu" msgstr "TeX Live menu" #: tlpkg/installer/install-menu-perltk.pl:57 +#: tlpkg/installer/install-tl-gui.tcl:1563 msgid "Launcher entry" msgstr "Launcher item" @@ -422,6 +415,7 @@ msgstr "Laad" #: texmf-dist/scripts/texlive/tlmgrgui.pl:2270 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2332 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2669 +#: tlpkg/installer/install-tl-gui.tcl:639 msgid "Warning" msgstr "Waarschuwing" @@ -463,6 +457,14 @@ msgstr "Kies een andere mirror." #: texmf-dist/scripts/texlive/tlmgrgui.pl:2466 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2504 #: texmf-dist/scripts/texlive/tlmgrgui.pl:2669 +#: tlpkg/installer/install-tl-gui.tcl:499 +#: tlpkg/installer/install-tl-gui.tcl:618 +#: tlpkg/installer/install-tl-gui.tcl:726 +#: tlpkg/installer/install-tl-gui.tcl:810 +#: tlpkg/installer/install-tl-gui.tcl:989 +#: tlpkg/installer/install-tl-gui.tcl:1027 +#: tlpkg/installer/install-tl-gui.tcl:1158 +#: tlpkg/installer/install-tl-gui.tcl:1299 msgid "Ok" msgstr "Ok" @@ -528,6 +530,7 @@ msgstr "Portable setup" #: texmf-dist/scripts/texlive/tlmgrgui.pl:1181 #: texmf-dist/scripts/texlive/tlmgrgui.pl:1231 #: texmf-dist/scripts/texlive/tlmgrgui.pl:1240 +#: tlpkg/installer/install-tl-gui.tcl:1416 msgid "Toggle" msgstr "Wijzig" @@ -553,22 +556,27 @@ msgstr "TEXMFHOME (voor eigen macros etc.)" #: tlpkg/installer/install-menu-perltk.pl:440 #: texmf-dist/scripts/texlive/tlmgrgui.pl:513 +#: tlpkg/installer/install-tl-gui.tcl:1498 msgid "Options" msgstr "Opties" #: tlpkg/installer/install-menu-perltk.pl:458 +#: tlpkg/installer/install-tl-gui.tcl:1518 msgid "Allow execution of restricted list of programs via \\write18" msgstr "Sta uitvoering van een beperkte lijst programmas toe via \\write18" #: tlpkg/installer/install-menu-perltk.pl:473 +#: tlpkg/installer/install-tl-gui.tcl:1525 msgid "Create all format files" msgstr "Genereer alle format bestanden" #: tlpkg/installer/install-menu-perltk.pl:485 +#: tlpkg/installer/install-tl-gui.tcl:1533 msgid "Install font/macro doc tree" msgstr "Installeer font/macro doc folder" #: tlpkg/installer/install-menu-perltk.pl:498 +#: tlpkg/installer/install-tl-gui.tcl:1543 msgid "Install font/macro source tree" msgstr "Installeer font/macro bron folder" @@ -578,8 +586,9 @@ msgid "Create symlinks in system directories" msgstr "Maak symlinks naar standaard-folders" #: tlpkg/installer/install-menu-perltk.pl:585 +#: tlpkg/installer/install-tl-gui.tcl:1636 msgid "After install, set CTAN as source for package updates" -msgstr "" +msgstr "Kies na installatie CTAN als bron voor nieuwe versies van pakketten" #: tlpkg/installer/install-menu-perltk.pl:607 #: tlpkg/installer/install-menu-perltk.pl:609 @@ -648,6 +657,7 @@ msgid "Deselect All" msgstr "Kies niets" #: tlpkg/installer/install-menu-perltk.pl:967 +#: tlpkg/installer/install-tl-gui.tcl:1616 msgid "create symlinks in standard directories" msgstr "Maak symlinks naar standaard-folders" @@ -824,10 +834,12 @@ msgid "not selected" msgstr "niet gekozen" #: texmf-dist/scripts/texlive/tlmgrgui.pl:389 +#: tlpkg/installer/install-tl-gui.tcl:1143 msgid "Select all" msgstr "Kies alles" #: texmf-dist/scripts/texlive/tlmgrgui.pl:391 +#: tlpkg/installer/install-tl-gui.tcl:1151 msgid "Select none" msgstr "Kies niets" @@ -1140,6 +1152,7 @@ msgid "Create shortcuts on the desktop" msgstr "Maak snelkoppelingen op het bureaublad." #: texmf-dist/scripts/texlive/tlmgrgui.pl:1236 +#: tlpkg/installer/install-tl-gui.tcl:1588 msgid "Install for all users" msgstr "Installeer voor alle gebruikers" @@ -1317,6 +1330,7 @@ msgid "Restore all packages to latest version" msgstr "Herstel alle pakketten naar de laatste versie" #: texmf-dist/scripts/texlive/tlmgrgui.pl:2417 +#: tlpkg/installer/install-tl-gui.tcl:382 msgid "Close" msgstr "Afsluiten" @@ -1385,6 +1399,231 @@ msgstr "" "%s is met een fout geeindigd.\n" "Raadpleeg het log venster voor details." +#: tlpkg/installer/install-tl-gui.tcl:159 +msgid "Error" +msgstr "Fout" + +#: tlpkg/installer/install-tl-gui.tcl:206 tlpkg/translations/shortdesc.pl:2507 +msgid "Welcome to TeX Live!" +msgstr "Welkom bij TeX Live!" + +#: tlpkg/installer/install-tl-gui.tcl:209 tlpkg/translations/shortdesc.pl:2510 +#, tcl-format, perl-format +msgid "" +"See %s/index.html for links to documentation.\n" +"The TeX Live web site (http://tug.org/texlive/) contains any updates and " +"corrections. TeX Live is a joint project of the TeX user groups around the " +"world; please consider supporting it by joining the group best for you. The " +"list of groups is available on the web at http://tug.org/usergroups.html." +msgstr "" +"Zie %s/index.html voor links naar documentatie.\n" +"De TeX Live web site (http://tug.org/texlive/) bevat\n" +"eventuele updates en correcties.\n" +"TeX Live is een gezamenlijk projekt van TeX gebruikersgroepen wereldwijd;\n" +"overweeg ondersteuning door lid te worden van zo'n groep.\n" +"De lijst van gebruikersgroepen staat op http://tug.org/usergroups.html." + +#: tlpkg/installer/install-tl-gui.tcl:213 tlpkg/translations/shortdesc.pl:2515 +#, tcl-format, perl-format +msgid "" +"Add %s/texmf-dist/doc/man to MANPATH.\n" +"Add %s/texmf-dist/doc/info to INFOPATH.\n" +"Most importantly, add %s/bin/%s\n" +"to your PATH for current and future sessions." +msgstr "" +"Voeg %s/texmf-dist/doc/man toe aan MANPATH.\n" +"Voeg %s/texmf-dist/doc/info toe aan INFOPATH.\n" +"En bovenal, voeg %s/bin/%s\n" +"toe aan PATH voor huidige en toekomstige sessies." + +#: tlpkg/installer/install-tl-gui.tcl:225 +msgid "Error while reading from Perl backend" +msgstr "Fout bij het lezen van het Perl achtergrond-proces" + +#: tlpkg/installer/install-tl-gui.tcl:237 +msgid "Unexpected closed backend" +msgstr "Achtergrond-proces onverwacht beeindigd" + +#: tlpkg/installer/install-tl-gui.tcl:347 +#: tlpkg/installer/install-tl-gui.tcl:1817 +msgid "TeX Live Installer" +msgstr "TeX Live Installatie" + +#: tlpkg/installer/install-tl-gui.tcl:349 +msgid "Loading..." +msgstr "Laden..." + +#: tlpkg/installer/install-tl-gui.tcl:466 +msgid "Browse..." +msgstr "Bladeren..." + +#: tlpkg/installer/install-tl-gui.tcl:560 +msgid "Select or type" +msgstr "Kies of type" + +#: tlpkg/installer/install-tl-gui.tcl:592 +msgid "Cannot be created or cannot be written to" +msgstr "Kan niet worden aangemaakt of is niet schrijfbaar" + +#: tlpkg/installer/install-tl-gui.tcl:604 +msgid "Directory name..." +msgstr "Folder-naam..." + +#: tlpkg/installer/install-tl-gui.tcl:611 +msgid "Change name (slashes not allowed)" +msgstr "Wijzig naam (slashes niet toegestaan)" + +#: tlpkg/installer/install-tl-gui.tcl:620 +msgid "No slashes allowed" +msgstr "Slashes niet toegestaan" + +#: tlpkg/installer/install-tl-gui.tcl:638 +msgid "" +"TL release component highly recommended!\n" +"Are you sure?" +msgstr "" +"TL jaar component sterk aanbevolen!\n" +"Weet u het zeker?" + +#: tlpkg/installer/install-tl-gui.tcl:681 +#: tlpkg/installer/install-tl-gui.tcl:1373 +#: tlpkg/installer/install-tl-gui.tcl:1381 +msgid "Installation root" +msgstr "Hoofd TeX-folder" + +#: tlpkg/installer/install-tl-gui.tcl:712 +msgid "Toggle year" +msgstr "Jaar component aan/uit" + +#: tlpkg/installer/install-tl-gui.tcl:720 +msgid "Localized directory names will be replaced by their real names" +msgstr "Aangepaste folder-namen worden vervangen door hun werkelijke namen" + +#: tlpkg/installer/install-tl-gui.tcl:797 +#, tcl-format +msgid "'~' equals %s, e.g. %s" +msgstr "" + +#: tlpkg/installer/install-tl-gui.tcl:923 +msgid "Cannot deselect own platform" +msgstr "Eigen platform is altijd geselecteerd" + +#: tlpkg/installer/install-tl-gui.tcl:954 +#: tlpkg/installer/install-tl-gui.tcl:1288 +msgid "Binaries" +msgstr "Binaries" + +#: tlpkg/installer/install-tl-gui.tcl:1006 +msgid "Schemes" +msgstr "Schema's" + +#: tlpkg/installer/install-tl-gui.tcl:1091 +msgid "Collections" +msgstr "Collecties" + +#: tlpkg/installer/install-tl-gui.tcl:1114 +msgid "Languages" +msgstr "Talen" + +#: tlpkg/installer/install-tl-gui.tcl:1116 +msgid "Other collections" +msgstr "Andere collecties" + +#: tlpkg/installer/install-tl-gui.tcl:1241 +msgid "Warning. Not all configured directories are writable!" +msgstr "Waarschuwing. Niet alle geconfigureerde folders zijn schrijfbaar!" + +#: tlpkg/installer/install-tl-gui.tcl:1261 +msgid "Symlinks" +msgstr "Symlinks" + +#: tlpkg/installer/install-tl-gui.tcl:1284 +msgid "browse..." +msgstr "Bladeren..." + +#: tlpkg/installer/install-tl-gui.tcl:1289 +msgid "Man pages" +msgstr "Man pagina's" + +#: tlpkg/installer/install-tl-gui.tcl:1290 +msgid "Info pages" +msgstr "Info pagina's" + +#: tlpkg/installer/install-tl-gui.tcl:1333 +#, tcl-format +msgid "TeX Live %s Installer" +msgstr "TeX Live %s Installatie" + +#: tlpkg/installer/install-tl-gui.tcl:1349 +msgid "Advanced" +msgstr "Geavanceerd" + +#: tlpkg/installer/install-tl-gui.tcl:1376 +msgid "Directories" +msgstr "Folders" + +#: tlpkg/installer/install-tl-gui.tcl:1394 +msgid "Local additions" +msgstr "Lokale toevoegingen" + +#: tlpkg/installer/install-tl-gui.tcl:1403 +msgid "Per-user additions" +msgstr "Toevoegingen per gebruiker" + +#: tlpkg/installer/install-tl-gui.tcl:1413 +msgid "" +"Portable setup:\n" +"May reset TEXMFLOCAL\n" +"and TEXMFHOME" +msgstr "" +"Portable setup:\n" +"Kan TEXMFLOCAL en\n" +"TEXMFHOME terugzetten" + +#: tlpkg/installer/install-tl-gui.tcl:1427 +msgid "Platforms" +msgstr "Platforms" + +#: tlpkg/installer/install-tl-gui.tcl:1440 +msgid "N. of additional platform(s):" +msgstr "Aantal extra platforms:" + +#: tlpkg/installer/install-tl-gui.tcl:1453 +msgid "Selections" +msgstr "Selekties" + +#: tlpkg/installer/install-tl-gui.tcl:1458 +msgid "Scheme:" +msgstr "Schema:" + +#: tlpkg/installer/install-tl-gui.tcl:1467 +msgid "N. of collections:" +msgstr "Aantal collecties:" + +#: tlpkg/installer/install-tl-gui.tcl:1470 +msgid "Customize" +msgstr "Aanpassen" + +#: tlpkg/installer/install-tl-gui.tcl:1479 +msgid "Disk space required (in MB):" +msgstr "Vereiste schijfruimte (in MB):" + +#: tlpkg/installer/install-tl-gui.tcl:1556 +msgid "Adjust searchpath" +msgstr "Zoekpad aanpassen" + +#: tlpkg/installer/install-tl-gui.tcl:1565 +msgid "Desktop integration" +msgstr "Bureaublad-integratie" + +#: tlpkg/installer/install-tl-gui.tcl:1577 +msgid "File associations" +msgstr "Koppeling bestandsformaten" + +#: tlpkg/installer/install-tl-gui.tcl:1622 +msgid "Specify directories" +msgstr "Specificeer folders" + #: tlpkg/translations/shortdesc.pl:1 msgid "basic scheme (plain and latex)" msgstr "basis-schema (Plain en latex)" @@ -1585,6 +1824,12 @@ msgstr "Ondersteunende programma's specifiek voor Windows" msgid "XeTeX and packages" msgstr "XeTeX en bijbehorende pakketten" +#~ msgid "'~' equals %s, e.g.%s" +#~ msgstr "'~' betekent %s, bijvoorbeeld %s" + +#~ msgid "Root of installation" +#~ msgstr "Hoofd TeX-folder" + #~ msgid "After installation, get package updates from CTAN" #~ msgstr "Aktualiseer pakketten vanuit CTAN na installatie" |