- Timestamp:
- 2017-03-07T19:32:33+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/gs3-setup.bat
r31470 r31471 168 168 :: http://stackoverflow.com/questions/6474738/batch-file-for-f-doesnt-work-if-path-has-spaces 169 169 :: 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" "%GSDL3SRCHOME%\bin\search4j.exe"`) do set bitness=%%G 170 if not exist "!GSDL3SRCHOME!\lib\jni\gdbmjava.dll" set bitness=UNKNOWN& goto testjavahome 171 for /f "usebackq tokens=2 delims= " %%G IN (`call "!GSDLHOME!\bin\windows\GNUfile\bin\file.exe" "!GSDL3SRCHOME!\lib\jni\gdbmjava.dll"`) do set bitness=%%G 171 172 172 173 if "%bitness%" == "PE32+" ( … … 198 199 if !ERRORLEVEL! equ 1 echo *** The detected JDK java is incompatible with !bitness! bit GS& goto testjre 199 200 if !ERRORLEVEL! equ 0 ( 200 echo *** The detected JDK java is a matching %bitness% bit 201 echo *** The detected JDK java is a matching %bitness% bit 201 202 goto setupjavahome 202 203 ) … … 209 210 "!FOUNDJREHOME!\bin\java.exe" -d%bitness% -version 2> nul 210 211 if !ERRORLEVEL! equ 1 echo *** The detected JRE java is incompatible with !bitness! bit GS& goto testbundledjre 211 if !ERRORLEVEL! equ 0 ( 212 if !ERRORLEVEL! equ 0 ( 212 213 rem The JRE_HOME found by search4j may be the bundled JRE, overriding any system JRE_HOME, 213 rem because the bundled JRE_HOME was provided as HINT to search4j. 214 echo *** The detected JRE java is a matching %bitness% bit 214 rem because the bundled JRE_HOME was provided as HINT to search4j. 215 echo *** The detected JRE java is a matching %bitness% bit 215 216 goto setupjrehome 216 217 ) … … 225 226 "!BUNDLED_JRE!\bin\java.exe" -d%bitness% -version 2> nul 226 227 if !ERRORLEVEL! equ 1 echo *** The detected JRE java is incompatible with !bitness! bit& goto setupjavahome 227 if !ERRORLEVEL! equ 0 ( 228 echo *** The detected JRE java is a matching %bitness% bit 228 if !ERRORLEVEL! equ 0 ( 229 echo *** The detected JRE java is a matching %bitness% bit 229 230 goto bundledjre 230 231 ) … … 249 250 if DEFINED FOUNDJAVAHOME ( 250 251 echo *** Using the JAVA_HOME detected at !FOUNDJAVAHOME! 251 set JAVA_HOME=!FOUNDJAVAHOME! 252 set JAVA_HOME=!FOUNDJAVAHOME! 252 253 set PATH=!FOUNDJAVAHOME!\bin;!PATH! 253 254 set RUNJAVA=!FOUNDJAVAHOME!\bin\java.exe
Note:
See TracChangeset
for help on using the changeset viewer.