Tuesday, March 26, 2013

Generating Sencha Touch 2 App Skeleton

After long time I'm back to the blog. It's not because I'm free, in fact I'm busy than ever but thought to share how to generate app skeleton via Sencha Touch CMD since I don't wanna see some one else get into the same difficulties I got in to.

For your reference here's the official site for doing just this. But I bet it wont help a lot. For this for now you need all 3 below to be already installed.

1. Java Run Time Environment  JRE
2. Sencha CMD (this provides commands for us to generate the app skeleton, etc)
3. Sencha Touch 2.1.1 SDK


Ok here are the quick steps...

Step 1:
During the Sencha CMD installation it should add it's path to the environment variables automatically, but if not please do as follow.
Add the Sencha CMD path (path/to/the/sencha_cmd_installation_directory,  for example: C:\Users\Madusha\bin\Sencha\Cmd\3.1.0.256) to the Path variable in the environment variables in your Windows OS.
If it's been added successfully you should get an out put like below depicting about the version and other command menus if you type 'sencha' in the command prompt.




If the path is not set properly below Warning message will pop out.




Step 2:
You then just have to type below to generate the app skeleton.
sencha -sdk "path/to/sencha_sdk" generate app yourAppName "path/to/the/appfolder"

The app folder will be created automatically. But remember you MUST need to have double quotes when you provide the path to sencha sdk.




Note: If you can not set path of Sencha CMD in the path variable then navigate to the   sencha_cmd_installation directory via command propmt and proceed with the Step2.



Good Luck !