From 165a8f158f50783176b4f9bd5a9ef43b0ed3f8ef Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Thu, 31 May 2012 08:16:00 +0000 Subject: Perltk installer: warnings about antivirus and admin rights git-svn-id: svn://tug.org/texlive/trunk@26739 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/installer/install-menu-perltk.pl | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'Master') diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index c3f7cae702d..8d7cf6a3248 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -549,10 +549,40 @@ Please select a different mirror.', $TeXLive::TLConfig::ReleaseYear, $texlive_re $subframe->pack(-expand => 1, -fill => "both"); $mainwindow->configure(-height => $rh, -width=>$rw); #$mw->pack(-expand => 1, -fill => "both"); + + pre_warn($mainwindow) if win32(); + Tk::MainLoop(); return($return); } +sub pre_warn() { + my $parent = shift; + require TeXLive::TLWinGoo; + my $pre_warning = $parent->Toplevel(); + $pre_warning->title( + __("TeX Live %s Installation", $TeXLive::TLConfig::ReleaseYear)); + my $wrn = __('Better turn off your virus scanner during installation'); + + if (!admin()) { + $wrn .= "\n\n". + __("The installer does not have adminstrative permissions;\ncan only install for current user"); + if (is_vista()) { + $wrn .= "\n\n". + __("Right-click install-tl-advanced and select \"run as administrator\"\n if you want to install for all users."); + } + } + $pre_warning->Label(-textvariable=>\$wrn, -justify=>'left')->pack(); + my $sf = $pre_warning->Frame; + $sf->Button(-text=>__('Quit'), -command=>sub{exit()})->pack(-side=>'left'); + $sf->Button(-text=>__('Continue'), -command=>sub{ + $parent->deiconify(); + $parent->raise; + $pre_warning->withdraw(); + })->pack(-side=>'right'); + $sf->pack(-fill => 'x'); +} + sub installation_window { # create a progress bar window $::sww = $mainwindow->Toplevel(-title => __("Installation process"), -- cgit v1.2.3