diff options
Diffstat (limited to 'Master/tlpkg/installer')
-rw-r--r-- | Master/tlpkg/installer/install-menu-wizard.pl | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl index 8e92cf77e0e..3626047b38f 100644 --- a/Master/tlpkg/installer/install-menu-wizard.pl +++ b/Master/tlpkg/installer/install-menu-wizard.pl @@ -61,6 +61,7 @@ my $prv; my $nxt; my $img; my $dest; +my $dest_display; my $warning; my $mw; my $usedfont; @@ -91,6 +92,18 @@ $::run_menu = \&run_menu_wizard; # From here on only function definitions # #################################################################### +sub native_slashify { + my ($r) = @_; + $r =~ s/\//\\/g if win32(); + return $r; +} + +sub forward_slashify { + my ($r) = @_; + $r =~ s/\\/\//g if win32(); + return $r; +} + sub setup_hooks_wizard { @::info_hook = (); push @::info_hook, @@ -130,6 +143,7 @@ sub run_menu_wizard { setup_hooks_wizard(); $dest = $vars{'TEXDIR'}; + $dest_display = native_slashify($dest); my $img = $mw->Photo(-format => 'png', -file => "$::installerdir/tlpkg/installer/texlive.png"); $mw->Label(-image => $img, -background => "#0078b8")->place(-x => 0, -y => 0); @@ -198,7 +212,7 @@ sub ask_path { } $counter->configure(-text => "2/5"); my $lab = $fmain->Label(-text => __('Destination folder:')); - my $val = $fmain->Label(-textvar => \$dest); + my $val = $fmain->Label(-textvar => \$dest_display); my $but = $fmain->Button(-text => __("Change"), -command => \&change_path, -relief => "ridge", -width => 10); @@ -273,12 +287,12 @@ sub change_path { $sw->transient($mw); $sw->grab(); $sw->Label(-text => __('Enter path for') . " TEXDIR: ")->pack(-padx => "2m", -pady => "2m"); - my $entry = $sw->Entry(-textvariable => $val, -width => 60); + my $entry = $sw->Entry(-textvariable => native_slashify($val), -width => 60); $entry->pack(-padx => "2m", -pady => "2m")->focus(); my $f = $sw->Frame; my $okbutton = $f->Button(-text => __('Ok'), -width => 10, -relief => "ridge", - -command => sub { $val = $entry->get; callback_change_texdir($val) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m"); + -command => sub { $val = forward_slashify($entry->get); callback_change_texdir($val) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m"); my $cancelbutton = $f->Button(-text => __('Cancel'), -relief => "ridge", -width => 10, -command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m"); @@ -314,6 +328,7 @@ sub callback_change_texdir { } $vars{'TEXDIRW'}=$vars{'TEXDIR'}; $dest = $vars{'TEXDIR'}; + $dest_display = native_slashify($dest); # useful as -textvar value in Labels check_show_warning(); } @@ -395,7 +410,7 @@ sub ask_go { my $ytmp = 170; $fmain->Label(-justify => "left", - -text => __("Destination folder:") . "\t $dest")->place(-x => 0, -y => $ytmp); + -text => __("Destination folder:") . "\t $dest_display")->place(-x => 0, -y => $ytmp); $ytmp += 20; for my $o (@opts_list) { |