1. #1
    Sencha User
    Join Date
    Jan 2009
    Location
    West Coast
    Posts
    37
    Vote Rating
    0
    slchorne is on a distinguished road

      0  

    Default SDK /bin/sencha fails on macos

    SDK /bin/sencha fails on macos


    If you install the sdk and aren't using /bin/bash as your shell, you will probably get an installation error. This is (it seems) because the installer wants to add stuff to your bashrc to work correctly.

    The better fix is to change the script in 'SenchaSDKTools-2.0.0-Beta/bin/sencha' to do this at runtime, and that way it won't care about what shell you are using.

    Here's how the script should look:

    Code:
    #!/bin/sh
    
    # we can override the default location of the setup from a .file
    if test -e ".senchasdk"
    then
        sdkpath=`cat .senchasdk`
    else
        # work out where we are
        BIN=$(dirname $(which $0))
    
        # and set the path to the parent dir
        sdkpath=$(dirname $BIN)
    fi
    
    # once we've done that, we still need to massage the $PATH to add
    # some other dirs
    PATH=$sdkpath:$PATH
    PATH=$sdkpath/bin:$PATH
    PATH=$sdkpath/command:$PATH
    PATH=$sdkpath/jsbuilder:$PATH
    
    # set up the DIR for sencha command
    DIR=$sdkpath/command
    
    # now run the command tool
    jsdb -path $DIR $DIR/sencha.js $*

  2. #2
    Sencha User
    Join Date
    Jan 2009
    Location
    West Coast
    Posts
    37
    Vote Rating
    0
    slchorne is on a distinguished road

      0  

    Default


    So, after more digging and debugging I found out that the individual SDKs (Touch, ext4) override the script that's in 'command/sencha'.

    This is why all the demos and tutes make you 'cd' to the SDK folder before running sencha command, because it wants you to find this override file ( called '.senchasdk' ).

    This is inherently bad because sooner or later someone is going to type:

    sencha generate app GS GS

    Instead of

    sencha generate app GS ../GS

    And they will create all sorts of cruft in the SDK folder, which is the last place you want it to be.

    The whole setup should be re-shaped so that it knows where the SDK is, knows where the tools are, and lets you work anywhere in the filesystem.

    The laziest way to do this is with another environment variable pointing to the SDK, thus :

    Code:
    setenv SENCHASDK ~/src/ext/sencha-touch-2.0.0-gpl
    sencha generate app GS ~/wherever/i/damn/well/want
    And, to get this to work, you have to re-write 'bin/sencha' to do the right thing:



    Code:
    #!/bin/sh
    
    # the individual SDKs (touch, Ext4, etc) drop in a special .file
    # so that you will load up their version of sencha/command
    # instead of the default you may have installed
    #
    # BUT, you still need the SDK tools, because they have the all important
    # things like jsdb
    #
    # so 'bin/sencha' calls './command/sencha' or the default 'command/sencha'
    # IFF all the paths are set correctly
    #
    
    # naturally, the *lazy* thing to do is pass the location of
    # your SDK as an environment variable
    
    # first, add a few things to the path
    # work out where we are
    BIN=$(dirname $(which $0))""
    
    # and set the path to the parent dir
    SDKTOOLDIR=$(dirname $BIN)
    
    PATH=$SDKTOOLDIR:$PATH
    PATH=$SDKTOOLDIR/bin:$PATH
    PATH=$SDKTOOLDIR/command:$PATH
    PATH=$SDKTOOLDIR/jsbuilder:$PATH
    
    # now see if we have an SDK that has local overrides.
    if [ ${SENCHASDK} ] 
    then
        # run the command from the ENV setting
        $SENCHASDK/command/sencha $*
    elif test -e ".senchasdk"
    then
        # run the local override of sencha command
        sdkpath=`cat .senchasdk`
        $sdkpath/command/sencha $*
    else
        # use the default
        DIR="$SDKTOOLDIR/command"
        jsdb -path $DIR $DIR/sencha.js $*
    fi

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar