- Timestamp:
- 2018-06-25T16:51:57+12:00 (6 years ago)
- Location:
- main/trunk
- Files:
-
- 359 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/gsConvert.pl
r32205 r32207 848 848 my $xpdf_pdftohtml = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "xpdf-tools"); 849 849 850 if ($ENV{'GSDLOS'} =~ m/^ windows$/i) {850 if ($ENV{'GSDLOS'} =~ m/^darwin$/i) { 851 851 # TODO 852 } elsif ($ENV{'GSDLOS'} =~ m/^darwin$/i) { 853 # TODO 854 } else { # unix, use the appropriate bin folder for the bitness of the system 855 852 } else { # unix or windows, use the appropriate bin folder for the bitness of the system 853 # In fact, when testing 3 different PDF docs, it doesn't seem to make a difference on 854 # 64 bit Windows whether the pdftohtml binary in the bin32 or bin64 folder is used. 855 # However, maybe we'll use another xpdf-tool too in future where bitness will be relevant. 856 856 857 # Don't use $ENV{'GSDLARCH'}, use the new $ENV{'BITNESS'}, since 857 858 # $ENV{'GSDLARCH'} is only (meant to be) set when many other 32-bit or 64-bit … … 866 867 } 867 868 869 #print STDERR "@@@@ BITNESS: " . $ENV{'BITNESS'} . "\n"; 870 868 871 # We'll create the file by name $output_filestem during post-conversion processing. 869 872 # Note that Xpdf tools will only create its conversion products in a dir that does -
main/trunk/greenstone2/setup.bat
r31990 r32207 245 245 246 246 :done 247 248 :: Want to know bitness of machine for working out whether to use xpdftools' bin32 or 249 :: bin64 directory to run Xpdf's pdftohtml. 250 :: Googled: determine bit architecture windows command line 251 :: techgenix.com/aquicktiptocheckoperatingsystemarchitecture/ 252 :: 'Type "SET Processor" (without double quotes) 253 :: You will see the output SIMILAR to below [among OTHER lines of output]: 254 :: PROCESSOR_ARCHITECTURE=x86 255 :: OR 256 :: PROCESSOR_ARCHITECTURE=x64.' 257 :: (In my case PROCESSOR_ARCHITECTURE=AMD64) 258 :: The following runs the cmd "set Processor". Then, among the multiline output, it finds the line 259 :: containing "PROCESSOR_ARCHITECTURE", splits this line on the delimiter "=" and stores the 2nd token in %%G 260 :: Based on the example "_ping_cmd" at https://ss64.com/nt/for_cmd.html 261 for /f "tokens=2 delims==" %%G in ('set Processor ^|find "PROCESSOR_ARCHITECTURE"') do set BITNESS=%%G 262 rem echo Processor architecture is %BITNESS% 263 :: which will be something like "amd64" or "x64", or "x86" for 32 bit 264 :: From https://ss64.com/nt/syntax-substring.html 265 :: "To do a string comparison, remove the SearchString and compare the result with the original 266 :: variable before removal. If both strings are the same, then SearchString was not found:" 267 rem set example=amd64 268 rem IF /i "%example:64=%" == "%example%" (echo Not 64 bit) ELSE (echo 64 bit) 269 if /i "%BITNESS:64=%" == "%BITNESS%" (set BITNESS=32) else (set BITNESS=64) 270 echo Bitness of machine: %BITNESS% 271 272 247 273 popd 248 endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME% 274 endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%& set BITNESS=%BITNESS% 249 275 250 276 if not "%JAVA_HOME%" == "" echo JAVA_HOME: %JAVA_HOME%
Note:
See TracChangeset
for help on using the changeset viewer.