mirror of https://github.com/sbt/sbt.git
Add sbt launcher script for Cygwin and MSYS to Windows installer
This commit is contained in:
parent
f889a92c34
commit
bc12a127ee
|
|
@ -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 "."
|
||||
}
|
||||
(
|
||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'>
|
||||
<Product Id='ce07be71-510d-414a-92d4-dff47631848a'
|
||||
Name='Simple Build Tool'
|
||||
Language='1033'
|
||||
|
|
@ -171,8 +172,13 @@ object Packaging {
|
|||
<File Id='jansi_launch' Name='SbtJansiLaunch.class' DiskId='1' Source='SbtJansiLaunch.class' />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Component Id='SbtLauncherScript' Guid='*'>
|
||||
<File Id='sbt_bat' Name='sbt.bat' DiskId='1' Source='sbt.bat' />
|
||||
<Component Id='SbtLauncherScript' Guid='DE0A5B50-0792-40A9-AEE0-AB97E9F845F5'>
|
||||
<File Id='sbt_bat' Name='sbt.bat' DiskId='1' Source='sbt.bat'>
|
||||
<!-- <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]" GenericRead="yes" Read="yes" GenericExecute="yes" ChangePermission="yes"/> -->
|
||||
</File>
|
||||
<File Id='sbt_sh' Name='sbt' DiskId='1' Source='sbt'>
|
||||
<!-- <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]" GenericRead="yes" Read="yes" GenericExecute="yes" ChangePermission="yes"/> -->
|
||||
</File>
|
||||
</Component>
|
||||
<Component Id='JansiJar' Guid='3370A26B-E8AB-4143-B837-CE9A8573BF60'>
|
||||
<File Id='jansi_jar' Name='jansi.jar' DiskId='1' Source='jansi.jar' />
|
||||
|
|
|
|||
|
|
@ -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 $@
|
||||
Loading…
Reference in New Issue