Changeset 24362 for main/trunk/greenstone2/bin/script/gsConvert.pl
- Timestamp:
- 2011-08-03T21:17:30+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/gsConvert.pl
r24223 r24362 47 47 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; 48 48 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 49 50 if(!$ENV{'PERLPATH'}) {51 use Config; # for some reason, this can't be a require statement52 my $full_perl_exec = $Config{perlpath}; #$^X;53 require File::Basename;54 my $perl_path = File::Basename::dirname($full_perl_exec);55 $ENV{'PERLPATH'} = $perl_path;56 }57 58 49 } 59 50 … … 63 54 use util; 64 55 use Cwd; 65 #use Config; # for getting the perlpath in the recommended way66 # Note: even though this (and other) use statement comes after its67 # usage in BEGIN, the use statement is in fact executed before BEGIN.68 # Doesn't work here for Greenstone 3.69 70 56 71 57 # Are we running on WinNT or Win2000 (or later)? … … 419 405 # formulate the command 420 406 my $cmd = ""; 421 my $full_perl_path = &util:: filename_cat($ENV{'PERLPATH'},"perl");407 my $full_perl_path = &util::get_perl_exec(); 422 408 $cmd .= "\"$full_perl_path\" -S ppttohtml.pl "; 423 409 $cmd .= " \"$input_filename\" \"$output_filestem.html\""; … … 453 439 # formulate the command 454 440 my $cmd = ""; 455 my $full_perl_path = &util:: filename_cat($ENV{'PERLPATH'},"perl");441 my $full_perl_path = &util::get_perl_exec(); 456 442 $cmd .= "\"$full_perl_path\" -S xlstohtml.pl "; 457 443 $cmd .= " \"$input_filename\" \"$output_filestem.html\""; … … 1014 1000 my $cmd = ""; 1015 1001 if ($timeout) {$cmd = "ulimit -t $timeout;";} 1016 my $full_perl_path = &util:: filename_cat($ENV{'PERLPATH'},"perl");1002 my $full_perl_path = &util::get_perl_exec(); 1017 1003 $cmd .= "\"$full_perl_path\" -S pdftohtml.pl -zoom $pdf_zoom"; 1018 1004 $cmd .= " -c" if ($pdf_complex); … … 1089 1075 if ($timeout) {$cmd = "ulimit -t $timeout;";} 1090 1076 $output_type =~ s/.*\_(.*)/$1/i; 1091 my $full_perl_path = &util:: filename_cat($ENV{'PERLPATH'},"perl");1077 my $full_perl_path = &util::get_perl_exec(); 1092 1078 $cmd .= "\"$full_perl_path\" -S pdfpstoimg.pl -convert_to $output_type \"$input_filename\" \"$output_filestem\""; 1093 1079 if ($ENV{'GSDLOS'} !~ m/^windows$/i || $is_winnt_2000) {
Note:
See TracChangeset
for help on using the changeset viewer.