buildPaths in app.json Sencha Touch 2.1 seems to be removed - sencha-touch-2

In my Sencha 2.0 App I had this in the app.json to defined where it should put the "compiled" javascript, but in Sencha 2.1 example apps its removed. It isnt respected after I updated to Sencha 2.1, anyone ones what happend to this?
/**
* Default paths to build this application to for each environment
*/
"buildPaths": {
"testing": "../../../../parentapp/build/testing",
"production": "../../../../parentapp/build/production",
"package": "../../../../parentapp/build/package",
"native": "../../../../parentapp/build/native"
},

Sencha Touch 2.1 and Sencha Cmd 3.1 no longer use app.json's buildPaths.
These are now defined (well, scattered) in a sequence of build.xml, build-impl.xml, and sencha.cfg files.
Display hidden directories/file and navigate to directory for your app. In this folder you will find a hidden folder named ".sencha". Within this folder you will find a folder "app" as well as "workspace" possibly (workspace is not a default creation). Inside the app folder is sencha.cfg where you can define the default build path for your application.
This option will place your builds in a folder "build" above your app folder:
app.build.dir=${app.dir}/../build
Using Sencha Cmd you can then type the following line, with the optional suffix defining type of build (defaults to production).
sencha app build (testing|production|package|native)
Package builds use a file called packager.json for build details.

Related

Set index.jsp as default startup page for application Sencha Architect

I am using Sencha Architect below mentioned is the configuration that i am using
version: 3.0.4.1386
channel: 3.0.1-stable
platform: 1.3.0.803
cmd: 4.0.4.84
framework: Ext JS 4.2.x
I had placed index.jsp in my application folder and removed index.html, but when i do any changes to my ExtJS MVC application and then save and run it on apache tomcat server, it creates a new index.html file in my application folder and tries to run this newly created index.html.
I want to set index.jsp as my default startup page for the ExtJS application.
What am i missing here?
Any kind of help is appreciated. Thanks.
Correct the app.json descriptor, adding the property:
app.indexHtmlPath
{
"name": "ApplicationName",
...
"app.indexHtmlPath": "index.jsp"
....
}
Details in application sencha folder: .sencha/app/defaults.properties file.
Form it:
# defaults to index.html, but may be overridden in app.json
app.indexHtmlPath=index.html
Sencha Cmd docs

Create a Sencha Touch app using the command line tools - Beginner

To generate a Sencha Touch project from the command line tools, i followed the following steps as described in many forums and also in the official Sencha touch doc. But it couldn't find the generate keyword.
Steps :
Navigate to the touch-2.2.1 SDK folder which is located at /Application/XAMPP/htdocs/touch-2.2.1/
sencha generate app MyWeb ../MyWeb/myweb
But, it failed to create a path at this specified location.
Can someone guide me with the steps to solve this?
Use following steps:
Go to directory where you have put Sencha Touch folder.
e.g. On Linux, if you have put it in Document/sencha/sencha_touch2.2.1 go to that directory using cd Documents/sencha/sencha_touch2.2.1.
Use command to generate app :
sencha generate app appname destination directory path/your app name.
e.g. You want to create app in www directory,use
sencha generate app myapp /var/www/myapp1
here myapp is app name and myapp1 is a directory in www that contains all application structure.
Try this:
sencha -sdk /path/to/sencha-touch-2-sdk generate app MyApp /path/to/www/myapp
Here,
/path/to/sencha-touch-2-sdk is path to your Sencha Touch library folder
/path/to/www/myapp is the path to the app
Follow following steps it may be helpful
1> Download Sencha CMD
2> Install Sencha CMD for that you required java installed on machine set environmental path of java.
3> After successful installation sencha cmd set sencha cmd environmental path.
4> Now open terminal/commandprompt type sencha if everything work fine it shows sencha help and sencha installed cmd version.
5> Now download sencha touch extract sencha touch folder in any directory you want.
6> After that go to that sencha touch folder from terminla or command prompt.
7> Then type following command for generating new app.
sencha generate app app_name /path/to-set-application/app_name
8> Open Webkit browser like chrome or safari type your folder path like
localhost/app_name
It Work !

Add assets in a sencha touch build (ST 2.2.1)

I have Sencha Touch 2.2.1 that includes assets like images, videos and .json's. I put them in the /resources folder.
When I build the application with Sencha Cmd like this:
sencha app build production
the assets are not copied to the destination folder (build/VSBabyMobile/production/resources)
There must be a way to configure more assets in .sencha/sencha.cfg or in Sencha Cmd, but I can't find the answer in the docs.
Thanks
Include the base resources folder as one of the resources in your app.json file.

Generate a sencha touch app

I am trying to create a new sencha touch app using "sencha generate app MyApp ../MyApp" command on Windows.
I have done the following :
Downloaded the latest sencha SDK and extracted it in folder "D:\MyProjects\sencha-touch-2.1.0-gpl" folder.
Installed the sencha SDK tools in "D:\MyProjects\SenchaSDKTools-2.0.0-beta3" folder.
Ensured that the system environment variable "SENCHA_SDK_TOOLS_2_0_0_BETA3" is indeed pointing to "D:\MyProjects\SenchaSDKTools-2.0.0-beta3"
As per the sencha documentation I am supposed to run the sencha command in the sencha SDK or application folder.
So if I cd to folder "D:\MyProjects\sencha-touch-2.1.0-gpl" and run "sencha generate app MyApp ../MyApp", I get this warning message
**"[WARN] The current working directory (D:\MyProjects\sencha-touch-2.1.0-gpl) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode."**
Why does not sencha recognize this as the SDK folder?
Looking at the code in "sencha.js" file included as part of the sdk tools, it seems that sencha is looking for a ".senchasdk" file.
So I tried the same command from one of the subfolders in the examples folder (since this folder contains a .senchasdk file)
Now I end up with an error
"node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'D:\MyProjects\sencha-touch-2.1.0-gpl\command\sencha.js'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)"
Since it seemed as if sencha was looking for a non existing folder called "command", I copied the contents of SDK tools folder to a new folder called "command" placed it under D:\MyProjects\sencha-touch-2.1.0-gpl\ folder.
Executing the sencha generate command, results in an infinite loop and a lot of Node.exe processes are spawned (observed via TaskManager).
Any help would be greatly appreciated.
I had the same problem and finally figured that Sencha Touch 2.1 is not longer using Sencha SDK Tools but using Sencha Command instead.
You can find more here :
http://docs.sencha.com/touch/2-1/#/guide/command
and here
http://docs.sencha.com/touch/2-1/#!/guide/command_app-section-2
Hope this helped
Try this...
Make sure three things..
Sencha touch installed path.
Application generating keyword
Where you going to save your Sencha touch project.
Lets create a project.
Open a command prompt
Type your Sencha touch sdk installed path. (For me: C:\inetpub\wwwroot\touch-2.3.1)
And type sencha generate app MyApp. here MyApp is our project name.
Then type the path where you going to save your project MyApp(For me: C:\inetpub\wwwroot\Poonguti\MyApp ).
press Enter.
Now, I hope you create a Sencha touch project.
here is an attached screen shot.
This is because, you are using the older version of SenchaCMD.
This can happen because of two reasons.
Reason 1
You installed SenchaCmd first and SenchaSDK second. This may override the latest version of SenchaCmd with older version, which is shipped with SenchaSDK.
Solution
Install SenchaSDK first and SenchaCmd last.
Reason 2
The path of SenchaCmd set on environment variable may be wrong. Please check this.
As TDeBailleul said, you don't need SenchaSDK for the latest version of SenchaTouch.
Just use SenchaCmd only.
I had the same issue. Finally, the problem was that I was using an old version of the sdk...
I would recenment to un installed version 2.0 and download and installed version 3.0.
Download Link
Install
sencha cmd
ruby
compasss
and Download sencha touch
extarct sencha touch and then type
sencha -sdk PATH TO TOUCH folder generate app APPNAME PROJECTPATH
Try navigating to the path where your sencha cmd got installed instead of sencha sdk folder
Open command propmt
cd C:\..\bin\Sencha\Cmd\4.0.2.67
Then type sencha and then press enter
You should get something like Sencha Cmd V4.0.2.67
my SDK is where i extracted my ExtJS files.
~/current/gaia/static/js/ext-5.1.1
you can generate workspace from within the folder like this:
sencha generate workspace /tmp/extJSworkSpace
or
you can specify it's location if you are not in the folder.
sencha -sdk ~/current/gaia/static/js/ext-5.1.1 generate workspace /tmp/extJSworkSpace
contents of the SDK folder looks like:
ls ~/current/gaia/static/js/ext-5.1.1
build cmd ext-bootstrap.js LICENSE overrides packages Readme.md src version.properties build.xml examples index.html licenses package.json plugins release-notes.html test welcome
if you don't specify -sdk flag and are not inside the folder, it will create the workspace still but there will be no 'ext' folder inside (not copied).
hope this helps.

How do I generate a scaffold for a Sencha Touch 2.x app?

I installed the ST SDK tools, and when I do 'sencha' at the command line I see this:
$ sencha
Sencha Command v2.0.0 Developer Preview
Copyright (c) 2011 Sencha Inc.
usage: sencha COMMAND [ARGS]
The available commands are:
build build a JSB project
create bootstrapdata generate boostrap data
create jsb generate a minimal JSB project for an app
create manifest generate classes manifest
package package your Touch web app into a native bundle
slice theme slice a custom theme's images for IE
See 'sencha help COMMAND' for more information on a specific command.
But when I try 'create bootstrapdata' it is asking me for all sorts of options.
$ sencha create bootstrapdata
usage: sencha create bootstrapdata [OPTIONS...]
COMMAND: Generate Bootstrap Data
DESCRIPTION:
Generate boostrap data
OPTIONS:
--core[=]value, -c[=]value (required)
The list of all core package names, comma-separated, for example:
"foundation,core,dom"
--ignore[=][value], -i[=][value]
The list of items to be ignored, comma-separated
--jsb[=]value, -j[=]value (required)
The path to the framework's jsb3 file
--output[=]value, -o[=]value (required)
The file path to write bootstrap data to
--output-release[=][value], -r[=][value]
The file path to write bootstrap data-release to
--platform[=]value, -p[=]value (required)
The path to platform source directory
--src[=]value, -s[=]value (required)
The path to the framework's source directory
How do I use one command at the command-line, without needing filepaths and other 'required' options, to generate a 'basic Hello World' ST2.x app?
Thanks.
Edit1: Btw, What I am trying to do is what Tommy Maintz did in his presentation on ST1.x at ST 2010 Conference.
Sencha generate does not exist for Sencha Touch 2 at this time. Sencha have plans to release an update for it at some point in the future, after ST2 has been released.
sencha create bootstrapdata is used when compiling your application into one JS file. You can find out more information about this here.
I also recommend you to ask questions over on the Sencha Touch Forums, which is extremely active.
If you want to do just that then go here http://sencha.com/x/6p and download the code from the presentation. In there you will find folder Command in the lib folder. While in that folder execute the following command:
./sencha generate app 'MyApp'
Note the ./