diff --git a/project/packaging.scala b/project/packaging.scala index 315c22fce..bb1321e0c 100644 --- a/project/packaging.scala +++ b/project/packaging.scala @@ -112,6 +112,7 @@ object Packaging { mappings in packageMsi in Windows <+= jansiJar map { f => f -> "jansi.jar" }, mappings in packageMsi in Windows <++= sourceDirectory in Windows map { d => Seq( (d / "sbt.bat") -> "sbt.bat", + (d / "sbt") -> "sbt", (d / "jansi-license.txt") -> "jansi-license.txt" )}, mappings in packageMsi in Windows <+= (compile in Compile, classDirectory in Compile) map { (c, d) => @@ -148,7 +149,7 @@ object Packaging { case Array(major) => Seq(major,"0","0","1") mkString "." } ( - + - - + + + + + + + diff --git a/src/windows/sbt b/src/windows/sbt new file mode 100644 index 000000000..f607847c5 --- /dev/null +++ b/src/windows/sbt @@ -0,0 +1,20 @@ +#!/bin/sh + +# sbt launcher script for Cygwin and MSYS + +UDIR=`dirname "$0"` +if [ -z "$MSYSTEM" ]; then + WDIR=`cygpath -alm "$UDIR"` +else + WDIR=`echo "$UDIR" | sed -e 's~^/\([^/]*\)/~\1:/~'` +fi + +if [ "_$TERM" = "_xterm" ]; then + # Let the terminal handle ANSI sequences + LAUNCHER=xsbt.boot.Boot +else + # Use Jansi to intercept ANSI sequences + LAUNCHER=SbtJansiLaunch +fi + +java -Xmx512M -Dsbt.log.format=true -cp "$WDIR/jansi.jar;$WDIR/sbt-launch.jar;$WDIR/classes" $LAUNCHER $@