-
25 Sep 2012 9:53 AM #1
Sencha Cmd 3.0 and Cygwin
Sencha Cmd 3.0 and Cygwin
Since I'm sure I'm not the only developer out there using cygwin, here's the changes I had to make to the "sencha" file so that java would find the sencha.jar file correctly - the changes are in bold:
(hint to Don and the Sencha Cmd team: cygwin support would be nice to have in the out-of-the-box install)Code:#!/bin/bash CURDIR=${PWD} BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #------------------------------------------------------------------------------ # Utility functions and such function die () { echo $1 exit 1 } function warn () { echo $1 } # Reads property $2 from properties file $1 and echos the value. To call this method do: # # V=$(getProp filename property) # function getProp () { # ignore lines with '#' as the first non-space character (comments) # grep for the property we want # get the last match just in case # strip the "property=" part but leave any '=' characters in the value echo `sed '/^[[:space:]]*\#/d' $1 | grep $2 | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'` } #------------------------------------------------------------------------------ # Main Script #echo baseDir=$BASEDIR #echo curDir=$CURDIR if [ ! -f $BASEDIR/sencha.cfg ]; then die "Sencha Cmd folder ($BASEDIR) is missing sencha.cfg - aborting!" fi # Read the version info for this executing version of the SDK Tools: toolsCfg=$BASEDIR/sencha.cfg jvmArgs=$(getProp $toolsCfg cmd.jvm.args) # For Cygwin, switch $BASEDIR to Windows format before running java case "`uname`" in CYGWIN*) cygwin=true;; esac if $cygwin; then BASEDIR=`cygpath --absolute --windows "$BASEDIR"` fi # Delegate to Java all of the arguments and exit with its exit code: touch stderr.txt java $jvmArgs -jar $BASEDIR/sencha.jar "$@" 2>stderr.txt ecode=$? redirect=$(cat stderr.txt) rm stderr.txt # test for the redirect code if [ $ecode == 42 ] then $redirect/sencha "$@" exit $? else exit $ecode fi
-
25 Sep 2012 6:06 PM #2
Thanks for the report! I have opened a bug in our bug tracker.
-
26 Sep 2012 7:44 AM #3
I'm able to generate an app just fine now, but I'm still having issues when trying to build it - it looks like the exec command in the app-build-impl target is unable to find the resources/sass/default directory, and from the error message, it does look like another path issue -
If I have time in the next couple of days, I'll try to dig into it some more.Code:[INFO ] app-build-impl: [INFO ] [exec] /cygdrive/c/workspace/foo/src/main/webapp/MyApp/.sencha/app/C:\workspace\foo\src\main\webapp\MyApp\resources\sass\default does not exist.
Success! Looks like we've fixed this one. According to our records the fix was applied for
SDKTOOLS-164
in
3.0.0.181.


Reply With Quote