442 | | # Perl comes installed with the GS Windows Release Kit. |
443 | | # However, if GS is from SVN, the user must have their own Perl and put it on the path. |
444 | | my $perl_bin_dir; # undefined |
445 | | if ($gsdlos eq "windows") { |
| 443 | # If the "perlpath" property is set in the gsdl(3)site.cfg config file, it is |
| 444 | # prepended to PATH only if the same perl bin dir path is not already on PATH env |
| 445 | my $perl_bin_dir = $self->get_perl_path($optional); |
| 446 | if(defined $perl_bin_dir) |
| 447 | { |
| 448 | &util::envvar_prepend("PATH", $perl_bin_dir); |
| 449 | } |
| 450 | elsif ($gsdlos eq "windows") |
| 451 | { |
| 452 | # Perl comes installed with the GS Windows Release Kit. However, note that if GS |
| 453 | # is from SVN, the user must have their own Perl and put it on the PATH or set |
| 454 | # perlpath in the gsdl site config file. |
451 | | |
452 | | # Uncomment these lines if you want to read the "perlpath" property from |
453 | | # the gsdl(3)site.cfg config file into PATH |
454 | | #if(!defined $perl_bin_dir) { |
455 | | #$perl_bin_dir = $self->get_perl_path(); |
456 | | #&util::envvar_append("PATH", $perl_bin_dir); |
457 | | #} |
458 | | |
459 | | # gsdl(3)site.cfg can specify JAVA_HOME and FEDORA_HOME along with Fedora's version. Both |
460 | | # are needed (by scripts g2f-import and g2f-buildcol) when using Greenstone 2 with Fedora. |
461 | | if(!defined $ENV{'JAVA_HOME'}) { |
462 | | $ENV{'JAVA_HOME'} = $self->get_java_home($optional); |
463 | | } |
464 | | |
| 460 | |
| 461 | # If javahome is explicitly set in the gsdl site config file then it will override |
| 462 | # any env variable JAVA_HOME. A GS2 server does not set JAVA_HOME, though java is on |
| 463 | # the path. Therefore, if Fedora is being used for FLI with GS2, then javahome must |
| 464 | # be set in gsdlsite.cfg or the JAVA_HOME env var must be explicitly set by the user. |
| 465 | my $java_home = $self->get_java_home($optional); |
| 466 | if(defined $java_home) { |
| 467 | $ENV{'JAVA_HOME'} = $java_home; |
| 468 | } |
| 469 | |
| 470 | # FEDORA_HOME and FEDORA_VERSION are needed (by scripts g2f-import and g2f-buildcol). |