Ignore:
Timestamp:
2018-06-25T16:51:57+12:00 (6 years ago)
Author:
ak19
Message:

Got a basic Windows version of PDFPlugin's new paged_html mode working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/setup.bat

    r31990 r32207  
    245245
    246246: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
     261for /f "tokens=2 delims==" %%G in ('set Processor ^|find "PROCESSOR_ARCHITECTURE"') do set BITNESS=%%G
     262rem 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:"
     267rem set example=amd64
     268rem IF /i "%example:64=%" == "%example%" (echo Not 64 bit) ELSE (echo 64 bit)
     269if /i "%BITNESS:64=%" == "%BITNESS%" (set BITNESS=32) else (set BITNESS=64)
     270echo Bitness of machine: %BITNESS%
     271
     272
    247273popd
    248 endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%
     274endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%& set BITNESS=%BITNESS%
    249275
    250276if not "%JAVA_HOME%" == "" echo JAVA_HOME: %JAVA_HOME%
Note: See TracChangeset for help on using the changeset viewer.