Changeset 16509
- Timestamp:
- 2008-07-22T13:41:28+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/cgi-bin/gsdlCGI.pm
r16467 r16509 297 297 sub get_perl_path { 298 298 my $self = shift @_; 299 my ($optional) = @_; 299 300 300 301 if (defined $self->{'perlpath'}) { … … 302 303 } 303 304 304 my $perlpath = $self->get_config_info("perlpath" );305 my $perlpath = $self->get_config_info("perlpath", $optional); 305 306 306 307 if(defined $perlpath) { … … 440 441 &util::envvar_append("PATH",$gsdl_bin_os); 441 442 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. 446 455 $perl_bin_dir = &util::filename_cat($gsdlhome, "bin", "windows", "perl", "bin"); 447 456 if(-e $perl_bin_dir) { … … 449 458 } 450 459 } 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). 465 471 $self->setup_fedora_homes($optional); 466 472 }
Note:
See TracChangeset
for help on using the changeset viewer.