Changeset 32209 for main/trunk/greenstone2/setup.bat
- Timestamp:
- 2018-06-25T17:15:40+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/setup.bat
r32207 r32209 246 246 :done 247 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) 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/ 258 253 :: The following runs the cmd "set Processor". Then, among the multiline output, it finds the line 259 254 :: containing "PROCESSOR_ARCHITECTURE", splits this line on the delimiter "=" and stores the 2nd token in %%G 260 255 :: 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 256 REM 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 264 258 :: From https://ss64.com/nt/syntax-substring.html 265 259 :: "To do a string comparison, remove the SearchString and compare the result with the original 266 260 :: 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 261 REM if /i "%BITNESS:64=%" == "%BITNESS%" (set BITNESS=32) else (set BITNESS=64) 272 262 273 263 popd 274 endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%& set BITNESS=%BITNESS% 264 endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME% 265 REM & set BITNESS=%BITNESS% 275 266 276 267 if not "%JAVA_HOME%" == "" echo JAVA_HOME: %JAVA_HOME%
Note:
See TracChangeset
for help on using the changeset viewer.