Preloader: support loading classpath dependencies from manifest
Move this logic from ide-compiler-runner. This fixes running 'kotlinc' CLI compiler locally when the runtime is changed binary incompatibly
This commit is contained in:
@@ -32,13 +32,10 @@ done;
|
||||
KOTLIN_HOME=`dirname "$SOURCE"`
|
||||
KOTLIN_HOME=`cd "$KOTLIN_HOME"; pwd -P`
|
||||
KOTLIN_HOME=`cd "$KOTLIN_HOME"/..; pwd`
|
||||
PATH_SEPARATOR=":"
|
||||
|
||||
if $cygwin; then
|
||||
# Remove spaces from KOTLIN_HOME on windows
|
||||
KOTLIN_HOME=`cygpath --windows --short-name "$KOTLIN_HOME"`
|
||||
|
||||
PATH_SEPARATOR=";"
|
||||
fi
|
||||
|
||||
[ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx256M -Xms32M -noverify"
|
||||
@@ -86,5 +83,5 @@ CPSELECT="-cp "
|
||||
"${java_args[@]}" \
|
||||
${CPSELECT}"${KOTLIN_HOME}/lib/kotlin-preloader.jar" \
|
||||
org.jetbrains.jet.preloading.Preloader \
|
||||
"${KOTLIN_HOME}/lib/kotlin-compiler.jar${PATH_SEPARATOR}${KOTLIN_HOME}/lib/kotlin-runtime.jar" \
|
||||
"${KOTLIN_HOME}/lib/kotlin-compiler.jar" \
|
||||
org.jetbrains.jet.cli.js.K2JSCompiler 4096 notime "$@"
|
||||
|
||||
@@ -26,7 +26,7 @@ rem We use the value of the JAVA_OPTS environment variable if defined
|
||||
set _JAVA_OPTS=-Xmx256M -Xms32M -noverify
|
||||
|
||||
"%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^
|
||||
org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^
|
||||
org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar" ^
|
||||
org.jetbrains.jet.cli.js.K2JSCompiler 4096 notime %*
|
||||
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
@@ -32,13 +32,10 @@ done;
|
||||
KOTLIN_HOME=`dirname "$SOURCE"`
|
||||
KOTLIN_HOME=`cd "$KOTLIN_HOME"; pwd -P`
|
||||
KOTLIN_HOME=`cd "$KOTLIN_HOME"/..; pwd`
|
||||
PATH_SEPARATOR=":"
|
||||
|
||||
if $cygwin; then
|
||||
# Remove spaces from KOTLIN_HOME on windows
|
||||
KOTLIN_HOME=`cygpath --windows --short-name "$KOTLIN_HOME"`
|
||||
|
||||
PATH_SEPARATOR=";"
|
||||
fi
|
||||
|
||||
[ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx256M -Xms32M -noverify"
|
||||
@@ -86,5 +83,5 @@ CPSELECT="-cp "
|
||||
"${java_args[@]}" \
|
||||
${CPSELECT}"${KOTLIN_HOME}/lib/kotlin-preloader.jar" \
|
||||
org.jetbrains.jet.preloading.Preloader \
|
||||
"${KOTLIN_HOME}/lib/kotlin-compiler.jar${PATH_SEPARATOR}${KOTLIN_HOME}/lib/kotlin-runtime.jar" \
|
||||
"${KOTLIN_HOME}/lib/kotlin-compiler.jar" \
|
||||
org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 notime "$@"
|
||||
|
||||
@@ -26,7 +26,7 @@ rem We use the value of the JAVA_OPTS environment variable if defined
|
||||
set _JAVA_OPTS=-Xmx256M -Xms32M -noverify
|
||||
|
||||
"%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^
|
||||
org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^
|
||||
org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar" ^
|
||||
org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 notime %*
|
||||
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
Reference in New Issue
Block a user