Changeset 32263

Show
Ignore:
Timestamp:
11.07.2018 18:54:06 (10 days ago)
Author:
ak19
Message:

gsConvert.pl's _get_xpdftools_bindir() is now drastically reduced in size as we're now working with our self-compiled xpdf-tools binaries on 32 bit linux, and the pre-compiled windows 32 bit binaries, and won't need to choose between bin32 and bin64 subfolders. Tomorrow will test whether the mac bins work on Mountain Lion and the newer OS, in which case there will be a universal xpdf-tools/bin directory for Mac as well.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gsConvert.pl

    r32226 r32263  
    928928sub _get_xpdftools_bindir { 
    929929 
    930     # build up the path to the containing bin dir of the xpdf conversion tool we're going to use 
    931     my $xpdf_tools_bin = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "xpdf-tools"); 
    932      
    933     if($ENV{'GSDLOS'} =~ m/^windows$/i) { # For Windows, just use the 32 bit xpdf's pdftohtml as it works the same as the 64 bit 
    934         $xpdf_tools_bin = &FileUtils::filenameConcatenate($xpdf_tools_bin, "bin32"); 
    935     } else { # unix (linux|darwin), use the bin32/bin64 folder depending on the BITNESS env var 
    936          
    937         # Don't use $ENV{'GSDLARCH'}, use the new $ENV{'BITNESS'}, since $ENV{'GSDLARCH'} 
    938         # isn't always set and has side-effects when it is set: 
    939         # $ENV{'GSDLARCH'} is only (meant to be) set when many other 32-bit or 64-bit 
    940         # specific subdirectories exist in a greenstone installation. 
    941         # None of those locations need exist when xpdf-tools is installed with GS. 
    942         # So don't depend on GSDLARCH as forcing that to be exported has side-effects 
    943         if($ENV{'BITNESS'}) { 
    944             $xpdf_tools_bin = &FileUtils::filenameConcatenate($xpdf_tools_bin, "bin".$ENV{'BITNESS'}); 
    945         } else { # what if $ENV{'BITNESS'} undefined, fallback on bin32? or 64? 
    946             $xpdf_tools_bin = &FileUtils::filenameConcatenate($xpdf_tools_bin, "bin32"); 
    947         } 
    948     } 
    949      
    950     return $xpdf_tools_bin; 
     930    # build up the path to the containing bin dir of the xpdf conversion tool we're going to use 
     931    my $xpdf_tools_bin = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "xpdf-tools", "bin");  
     932    return $xpdf_tools_bin; 
    951933} 
    952934