1. #1
    Sencha User rabelanger's Avatar
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    15
    Vote Rating
    1
    rabelanger is on a distinguished road

      0  

    Default Moving ext folder

    Moving ext folder


    Hi,

    I generated an app using sencha cmd, everything worked fined. The only thing I want to do is move the ext folder. Instead of ext at the root, i'd moved it to libs/ext. I have a few other libs in my project.

    What do I need to update in the project (*.cfg, .build, etc) so that when I build the app, it goes read the sdk at the right place. I looked a bit in the files, updated what I thought needed to be updated but then build commands dont work anymore...

    Thanks in advance
    rafael

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    First you can move ext to lib. Then you need to take a couple steps.

    First you need to change index.html to point the ext-dev.js to the lib/ext/ext-dev.js

    Now you need to recompile the bootstrap.js and you can do something like this from the command line:

    sencha compile -classpath=lib/ext/src meta -alias -out bootstrap.js and meta -alt -append -out bootstrap.js and meta -loader -append -out bootstrap.js

    The last thing you need to do for a default app is the resources/theme/app.css has an @import that you also need to change to reflect the lib dir nesting now.

    Just tried this with Cmd 3.0.2 and Ext JS 4.1.3 and these were the steps I had to take.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    keithrz is on a distinguished road

      0  

    Default


    What about renames? I had an existing project with the sdk in "extjs" instead of "ext". I tried running through those same steps listed above, but with "-classpath=extjs/src", and got the following error:

    C:\myPath\web-app>sencha app build
    Sencha Cmd v3.0.2.288
    [ERR] The following error occurred while executing this line:
    C:\myPath\web-app\.sencha\workspace\plugin.xml:2: Cannot find C:\myPath\web-app\.sencha\workspace\${framework.config.dir}\plugin.xml imported
    from C:\myPath\web-app\.sencha\workspace\plugin.xml

  4. #4
    Sencha User
    Join Date
    Sep 2009
    Posts
    7
    Vote Rating
    0
    mr.a is on a distinguished road

      0  

    Default I'm using 4.2.1 and the instruction is not working..

    I'm using 4.2.1 and the instruction is not working..


    the "sencha app build" goes all right until Capturing image. Exception info :

    [INF] Capturing theme image
    [INF] loading page D%3A/myBox\work\UED\buildtest/sass/example/theme.html
    == Unhandled Error ==
    ReferenceError: Can'''t find variable: Ext


    file:///D:/myBox/work/UED/buildtest/sass/example/bootstrap.js:7


    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    [ERR]
    [ERR] Total time: 1 minute 14 seconds
    [ERR] The following error occurred while executing this line:
    D:\myBox\work\UED\buildtest\.sencha\app\build-impl.xml:469: com.sencha.exception
    s.ExProcess: phantomjs process exited with code 2


    Any advice?

    Quote Originally Posted by mitchellsimoens View Post
    First you can move ext to lib. Then you need to take a couple steps.

    First you need to change index.html to point the ext-dev.js to the lib/ext/ext-dev.js

    Now you need to recompile the bootstrap.js and you can do something like this from the command line:

    sencha compile -classpath=lib/ext/src meta -alias -out bootstrap.js and meta -alt -append -out bootstrap.js and meta -loader -append -out bootstrap.js

    The last thing you need to do for a default app is the resources/theme/app.css has an @import that you also need to change to reflect the lib dir nesting now.

    Just tried this with Cmd 3.0.2 and Ext JS 4.1.3 and these were the steps I had to take.

  5. #5
    Ext JS Premium Member burnnat's Avatar
    Join Date
    Jun 2011
    Posts
    418
    Vote Rating
    61
    burnnat is a jewel in the rough burnnat is a jewel in the rough burnnat is a jewel in the rough burnnat is a jewel in the rough

      0  

    Default


    Quote Originally Posted by mr.a View Post
    the "sencha app build" goes all right until Capturing image. Exception info :

    [INF] Capturing theme image
    [INF] loading page D%3A/myBox\work\UED\buildtest/sass/example/theme.html
    == Unhandled Error ==
    ReferenceError: Can'''t find variable: Ext
    This is the error you get when the path to ExtJS in your sass/example/theme.html file is incorrect. Look in the file for a line like this, and double-check that it's pointing to the right location:
    Code:
    <script type="text/javascript" src="../../../ext/ext-dev.js"></script>
    The src path should be relative to the location of the theme.html file, not the root of your app or workspace. You'll also want to do the same for the manifest and shortcuts files:
    Code:
    <script type="text/javascript" src="../../../ext/packages/ext-theme-base/sass/example/manifest.js"></script>
    <script type="text/javascript" src="../../../ext/packages/ext-theme-base/sass/example/shortcuts.js"></script>