Ignore:
Timestamp:
2018-06-25T17:15:40+12:00 (6 years ago)
Author:
ak19
Message:

Commented out the BITNESS env var for Windows introduced in the previous commit and not using it in gsConvert.pl since Win can use XPdf's bin32 version of pdftohtml on 64 bit machines too. The lines determining and setting the BITNESS env var in gs2build\setup.bat are only commented out since setting BITNESS on Win may be useful in the future and we don't want to reinvent the wheel

File:
1 edited

Legend:

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

    r32207 r32209  
    847847    # build up the path to the doc-to-html conversion tool we're going to use
    848848    my $xpdf_pdftohtml = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "xpdf-tools");
    849 
    850     if ($ENV{'GSDLOS'} =~ m/^darwin$/i) {
    851     # TODO
     849   
     850    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
     851        $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin32");
     852    } elsif ($ENV{'GSDLOS'} =~ m/^darwin$/i) {
     853        # TODO
    852854    } else { # unix or windows, use the appropriate bin folder for the bitness of the system
    853855        # In fact, when testing 3 different PDF docs, it doesn't seem to make a difference on
     
    855857        # However, maybe we'll use another xpdf-tool too in future where bitness will be relevant.
    856858   
    857     # Don't use $ENV{'GSDLARCH'}, use the new $ENV{'BITNESS'}, since
    858     # $ENV{'GSDLARCH'} is only (meant to be) set when many other 32-bit or 64-bit
    859     # specific subdirectories exist in a greenstone installation.
    860     # None of those locations need exist when xpdf-tools is installed with GS.
    861     # So don't depend on GSDLARCH as forcing that to be exported has side-effects
    862     if($ENV{'BITNESS'}) {
    863         $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin".$ENV{'BITNESS'});
    864     } else { # what if $ENV{'BITNESS'} undefined, fallback on bin32? or 64?
    865         $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin32");
    866     }
    867     }
    868 
    869     #print STDERR "@@@@ BITNESS: " . $ENV{'BITNESS'} . "\n";
     859        # Don't use $ENV{'GSDLARCH'}, use the new $ENV{'BITNESS'}, since
     860        # $ENV{'GSDLARCH'} is only (meant to be) set when many other 32-bit or 64-bit
     861        # specific subdirectories exist in a greenstone installation.
     862        # None of those locations need exist when xpdf-tools is installed with GS.
     863        # So don't depend on GSDLARCH as forcing that to be exported has side-effects
     864        if($ENV{'BITNESS'}) {
     865            $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin".$ENV{'BITNESS'});
     866        } else { # what if $ENV{'BITNESS'} undefined, fallback on bin32? or 64?
     867            $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin32");
     868        }
     869    }
    870870   
    871871    # We'll create the file by name $output_filestem during post-conversion processing.
Note: See TracChangeset for help on using the changeset viewer.