text stringlengths 0 834k |
|---|
echo JAVA_OPTS Environment variable, if unset uses """" |
echo SBT_OPTS Environment variable, if unset uses """" |
echo ACTIVATOR_OPTS Environment variable, if unset uses """" |
echo. |
echo Please note that in order for Activator to work you must have Java available on the classpath |
echo. |
goto :end |
) |
) |
@REM determine ACTIVATOR_HOME environment variable |
set BIN_DIRECTORY=%~dp0 |
set BIN_DIRECTORY=%BIN_DIRECTORY:~0,-1% |
for %%d in (%BIN_DIRECTORY%) do set ACTIVATOR_HOME=%%~dpd |
@REM set ACTIVATOR_HOME=%ACTIVATOR_HOME:~0,-1% |
set ACTIVATOR_HOME=D:\Program Files\Activator |
echo ACTIVATOR_HOME=""%ACTIVATOR_HOME%"" |
set ERROR_CODE=0 |
set APP_VERSION=1.3.10 |
set ACTIVATOR_LAUNCH_JAR=activator-launch-%APP_VERSION%.jar |
rem Detect if we were double clicked, although theoretically A user could |
rem manually run cmd /c |
for %%x in (%cmdcmdline%) do if %%~x==/c set DOUBLECLICKED=1 |
set SBT_HOME=%BIN_DIRECTORY |
rem Detect if we were double clicked, although theoretically A user could |
rem manually run cmd /c |
for %%x in (%cmdcmdline%) do if %%~x==/c set DOUBLECLICKED=1 |
rem FIRST we load the config file of extra options. |
set FN=%SBT_HOME%\..\conf\sbtconfig.txt |
set CFG_OPTS= |
FOR /F ""tokens=* eol=# usebackq delims="" %%i IN (""%FN%"") DO ( |
set DO_NOT_REUSE_ME=%%i |
rem ZOMG (Part #2) WE use !! here to delay the expansion of |
rem CFG_OPTS, otherwise it remains """" for this loop. |
set CFG_OPTS=!CFG_OPTS! !DO_NOT_REUSE_ME! |
) |
rem FIRST we load a config file of extra options (if there is one) |
set ""CFG_FILE_HOME=%UserProfile%\.activator\activatorconfig.txt"" |
set ""CFG_FILE_VERSION=%UserProfile%\.activator\%APP_VERSION%\activatorconfig.txt"" |
if exist %CFG_FILE_VERSION% ( |
FOR /F ""tokens=* eol=# usebackq delims="" %%i IN (""%CFG_FILE_VERSION%"") DO ( |
set DO_NOT_REUSE_ME=%%i |
rem ZOMG (Part #2) WE use !! here to delay the expansion of |
rem CFG_OPTS, otherwise it remains """" for this loop. |
set CFG_OPTS=!CFG_OPTS! !DO_NOT_REUSE_ME! |
) |
) |
if ""%CFG_OPTS%""=="""" ( |
if exist %CFG_FILE_HOME% ( |
FOR /F ""tokens=* eol=# usebackq delims="" %%i IN (""%CFG_FILE_HOME%"") DO ( |
set DO_NOT_REUSE_ME=%%i |
rem ZOMG (Part #2) WE use !! here to delay the expansion of |
rem CFG_OPTS, otherwise it remains """" for this loop. |
set CFG_OPTS=!CFG_OPTS! !DO_NOT_REUSE_ME! |
) |
) |
) |
rem We use the value of the JAVACMD environment variable if defined |
set _JAVACMD=%JAVACMD% |
if ""%_JAVACMD%""=="""" ( |
if not ""%JAVA_HOME%""=="""" ( |
if exist ""%JAVA_HOME%\bin\java.exe"" set ""_JAVACMD=%JAVA_HOME%\bin\java.exe"" |
rem if there is a java home set we make sure it is the first picked up when invoking 'java' |
SET ""PATH=%JAVA_HOME%\bin;%PATH%"" |
) |
) |
if ""%_JAVACMD%""=="""" set _JAVACMD=java |
rem Detect if this java is ok to use. |
for /F %%j in ('""%_JAVACMD%"" -version 2^>^&1') do ( |
if %%~j==java set JAVAINSTALLED=1 |
if %%~j==openjdk set JAVAINSTALLED=1 |
) |
rem Detect the same thing about javac |
if ""%_JAVACCMD%""=="""" ( |
if not ""%JAVA_HOME%""=="""" ( |
if exist ""%JAVA_HOME%\bin\javac.exe"" set ""_JAVACCMD=%JAVA_HOME%\bin\javac.exe"" |
) |
) |
if ""%_JAVACCMD%""=="""" set _JAVACCMD=javac |
for /F %%j in ('""%_JAVACCMD%"" -version 2^>^&1') do ( |
if %%~j==javac set JAVACINSTALLED=1 |
) |
rem BAT has no logical or, so we do it OLD SCHOOL! Oppan Redmond Style |
set JAVAOK=true |
if not defined JAVAINSTALLED set JAVAOK=false |
if not defined JAVACINSTALLED set JAVAOK=false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.