Changeset 32209 for main/trunk/greenstone2/bin
- Timestamp:
- 2018-06-25T17:15:40+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/gsConvert.pl
r32207 r32209 847 847 # build up the path to the doc-to-html conversion tool we're going to use 848 848 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 852 854 } else { # unix or windows, use the appropriate bin folder for the bitness of the system 853 855 # In fact, when testing 3 different PDF docs, it doesn't seem to make a difference on … … 855 857 # However, maybe we'll use another xpdf-tool too in future where bitness will be relevant. 856 858 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 } 870 870 871 871 # We'll create the file by name $output_filestem during post-conversion processing.
Note:
See TracChangeset
for help on using the changeset viewer.