Changeset 31460


Ignore:
Timestamp:
2017-03-06T15:42:38+13:00 (7 years ago)
Author:
ak19
Message:

Dr Bainbridge advised that it would be better to perform the bitness test on gdbmjava.dll instead of wvware.exe, since we're guaranteed its presence in GS3 and its also a JNI lib. GS2 setup.bat not updated to do bitness tests, as GS2 does not use JNI, so there are no Java bitness issues in GS2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-setup.bat

    r31447 r31460  
    150150:: GNUfile: http://stackoverflow.com/questions/2689168/checking-if-file-is-32bit-or-64bit-on-windows
    151151:: http://gnuwin32.sourceforge.net/packages/file.htm
    152 :: using Cygwin's file utility:
     152:: Also http://stackoverflow.com/questions/4089641/programatically-determine-if-native-exe-is-32-bit-or-64-bit
    153153:: http://stackoverflow.com/questions/2062020/how-can-i-tell-if-im-running-in-64-bit-jvm-or-32-bit-jvm-from-within-a-program
    154 :: http://stackoverflow.com/questions/4089641/programatically-determine-if-native-exe-is-32-bit-or-64-bit
    155 :: http://cygwin.com/cgi-bin2/package-grep.cgi?grep=utility
    156 :: https://cygwin.com/licensing.html
    157154:: Messy way: http://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows
    158155
    159156:: "%GSDLHOME%\bin\windows\GNUfile\bin\file.exe" "%GSDLHOME%\bin\windows\wvWare.exe"
     157:: But we'll test the bitness of gdbmjava.dll itself as it's guaranteed to be present in GS3 and is also dependent on JNI
     158:: No need to have the right bitness for GS2, since it doesn't use JNI
    160159
    161160:: See https://ss64.com/nt/for_cmd.html for using batch FOR to loop against the results of another command.
     
    168167:: http://stackoverflow.com/questions/6474738/batch-file-for-f-doesnt-work-if-path-has-spaces
    169168:: Could use shortfilenames, see http://stackoverflow.com/questions/10227144/convert-long-filename-to-short-filename-8-3-using-cmd-exe
    170 for /f "usebackq tokens=2 delims= " %%G IN (`call "%GSDLHOME%\bin\windows\GNUfile\bin\file.exe" "%GSDLHOME%\bin\windows\wvWare.exe"`) do set bitness=%%G
     169for /f "usebackq tokens=2 delims= " %%G IN (`call "%GSDLHOME%\bin\windows\GNUfile\bin\file.exe" "%GSDL3SRCHOME%\lib\jni\gdbmjava.dll"`) do set bitness=%%G
    171170
    172171if "%bitness%" == "PE32+" (
Note: See TracChangeset for help on using the changeset viewer.