Created
June 16, 2012 03:52
-
-
Save huynhjl/2939832 to your computer and use it in GitHub Desktop.
Patch for play and framework/build to run under cygwin and mingw32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r --unified play-2.0-orig/framework/build play-2.0-cygwin/framework/build | |
--- play-2.0-orig/framework/build 2012-03-12 20:25:28.000000000 -0700 | |
+++ play-2.0-cygwin/framework/build 2012-06-15 17:56:57.436000000 -0700 | |
@@ -8,4 +8,4 @@ | |
DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}" | |
fi | |
-java ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version="${PLAY_VERSION}" -Dsbt.ivy.home=`dirname $0`/../repository -Dplay.home=`dirname $0` -Dsbt.boot.properties=`dirname $0`/sbt/sbt.boot.properties -jar `dirname $0`/sbt/sbt-launch.jar "$@" | |
\ No newline at end of file | |
+java ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version="${PLAY_VERSION}" -Dsbt.ivy.home=`dirname $0`/../repository -Dplay.home=`dirname $0` -Dsbt.boot.properties=$BOOTPROP`dirname $0`/sbt/sbt.boot.properties -jar `dirname $0`/sbt/sbt-launch.jar "$@" | |
diff -r --unified play-2.0-orig/play play-2.0-cygwin/play | |
--- play-2.0-orig/play 2012-03-12 20:22:03.000000000 -0700 | |
+++ play-2.0-cygwin/play 2012-06-15 20:48:41.624800000 -0700 | |
@@ -1,5 +1,23 @@ | |
#! /usr/bin/env sh | |
+case `uname` in | |
+ CYGWIN*) | |
+ function dirname { | |
+ cygpath -m `command dirname $@` | |
+ } | |
+ typeset -fx dirname | |
+ export BOOTPROP="file:///" | |
+ ;; | |
+ MINGW32*) | |
+ function dirname { (cd `command dirname $@`; pwd -W) } | |
+ typeset -fx dirname | |
+ export BOOTPROP="file:///" | |
+ ;; | |
+ *) | |
+ export BOOTPROP="" | |
+ ;; | |
+esac | |
+ | |
PRG="$0" | |
while [ -h "$PRG" ] ; do | |
PRG=`readlink "$PRG"` | |
@@ -54,5 +72,5 @@ | |
fi | |
else | |
- java -Dsbt.ivy.home=$dir/repository -Dplay.home=$dir/framework -Dsbt.boot.properties=$dir/framework/sbt/play.boot.properties -jar $dir/framework/sbt/sbt-launch.jar "$@" | |
+ java -Dsbt.ivy.home=$dir/repository -Dplay.home=$dir/framework -Dsbt.boot.properties=$BOOTPROP$dir/framework/sbt/play.boot.properties -jar $dir/framework/sbt/sbt-launch.jar "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
does this work with play 2.1 ?