1 use SL::InstallationCheck;
 
   5 sub verify_installation {
 
   9   my $form     = $main::form;
 
  11   return unless ($form->{"action"} && ($script eq "login.pl"));
 
  13   SL::InstallationCheck::check_for_conditional_dependencies();
 
  15   my @missing_modules = SL::InstallationCheck::test_all_modules();
 
  16   return if (scalar(@missing_modules) == 0);
 
  20   my $locale = Locale->new($::lx_office_conf{system}->{language}, "installationcheck");
 
  22   print(qq|content-type: text/html
 
  26   <link rel="stylesheet" href="css/lx-office-erp.css" type="text/css"
 
  27         title="kivitendo stylesheet">
 
  28   <title>| . $locale->text("One or more Perl modules missing") . qq|</title>
 
  32   <h1>| . $locale->text("One or more Perl modules missing") . qq|</h1>
 
  34   <p>| . $locale->text("At least one Perl module that kivitendo ERP " .
 
  35                        "requires for running is not installed on your " .
 
  38         $locale->text("Please install the below listed modules or ask your " .
 
  39                       "system administrator to.") .
 
  41         $locale->text("You cannot continue before all required modules are " .
 
  42                       "installed.") . qq|</p>
 
  47      <th class="listheading">| . $locale->text("Module name") . qq|</th>
 
  48      <th class="listheading">| . $locale->text("Module home page") . qq|</th>
 
  54   foreach my $module (@missing_modules) {
 
  56      <tr class="listrow${odd}">
 
  57       <td><code>$module->{name}</code></td>
 
  58       <td><a href="$module->{url}">$module->{url}</a></td>
 
  67   <p>| . $locale->text("There are usually three ways to install " .
 
  70         $locale->text("The preferred one is to install packages provided by " .
 
  71                       "your operating system distribution (e.g. Debian or " .
 
  72                       "RPM packages).") . qq|</p>
 
  74   <p>| . $locale->text("The second way is to use Perl's CPAN module and let " .
 
  75                        "it download and install the module for you.") .
 
  77         $locale->text("Here's an example command line:") . qq|</p>
 
  79   <p><code>perl -MCPAN -e "install Config::Std"</code></p>
 
  81   <p>| . $locale->text("The third way is to download the module from the " .
 
  82                        "above mentioned URL and to install the module " .
 
  83                        "manually following the installations instructions " .
 
  84                        "contained in the source archive.") . qq|</p>
 
  90   $::dispatcher->end_request;