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/setup.bat

    r32207 r32209  
    246246:done
    247247
    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)
     248:: COMMENTING OUT THE 2 LINES DETERMINING AND SETTING THE BITNESS (32/64) ON WIN MACHINES
     249:: AS IT MAY BE USEFUL IN FUTURE AND IT TOOK ME SOME TIME TO GET THESE LINES WORKING RIGHT
     250:: To know bitness (32 vs 64) of a Windows machine, the cmd is "SET Processor"
     251::   and look through the lines of output for the line PROCESSOR_ARCHITECTURE=x86
     252::   or PROCESSOR_ARCHITECTURE=x64. See techgenix.com/aquicktiptocheckoperatingsystemarchitecture/
    258253:: The following runs the cmd "set Processor". Then, among the multiline output, it finds the line
    259254::   containing "PROCESSOR_ARCHITECTURE", splits this line on the delimiter "=" and stores the 2nd token in %%G
    260255::   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
     256REM for /f "tokens=2 delims==" %%G in ('set Processor ^|find "PROCESSOR_ARCHITECTURE"') do set BITNESS=%%G
     257::   BITNESS will now be "x86" for 32 bit or something like "amd64" or "x64" for 64 bit
    264258:: From https://ss64.com/nt/syntax-substring.html
    265259::   "To do a string comparison, remove the SearchString and compare the result with the original
    266260::   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 
     261REM if /i "%BITNESS:64=%" == "%BITNESS%" (set BITNESS=32) else (set BITNESS=64)
    272262
    273263popd
    274 endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%& set BITNESS=%BITNESS%
     264endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%
     265REM      & set BITNESS=%BITNESS%
    275266
    276267if not "%JAVA_HOME%" == "" echo JAVA_HOME: %JAVA_HOME%
Note: See TracChangeset for help on using the changeset viewer.