I had to move the lib folder of senchas touch framework. Now I keep getting errors where Sencha look for the framwork in the wrong folder. In which config file do I define the path of the framework? Is it in the hidden .Sencha-folder?
New location is lib/touch/
You will find and entry inside the {root}/bootstrap.js
"Ext": "touch/src",
Around line 4. Change this to your needs
Related
I am new to Sencha Touch and the Sencha world. During sencha app build in development, I want to specity my server absolute url in the generated bootstrap.js so that the Sencha loader loads the widgets using the correct url.
How can I do this?
Any pointer would be appreciated.
You want to utilize paths configuration. This can and should be done in your application definition (app.js) by adding an array of paths. Here you can map a specific/custom class namespace to a URL path.
You will also want to add this to "classpath" in app.json.
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.
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.
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.
I have created a sample application to perform bump distortion, using the GPUImage framework. I added this framework to my application, but I'm seeing the following error
Lexical or preprocessor issue 'GPUImage.h' file not found.
I have added the -ObjC flag to the Other Linker Flags, but I'm still seeing this error. How can I solve this problem and get my application to compile?
Adding GPUImage framework to XCode project could be tricky. So I haved added detailed step-by-step instructions w/ images on how to do it.
Static Compilation Method (detailed solution so we don't mess up)
This is Static compilation method. In this basically we will compile the framework using ./build.sh file. And simply add it to our XCode project, then configure XCode to properly use it.
Download GPUImage from Github and extract it (or just clone it).
Go to the GPUImagefolder in terminal
Run ./build.sh
Note: This will compile and create ready-to-use binary for all the sdks on your mac.
build.sh creates a folder called build and generates compiled binaries and dumps them to folders like: Release-iPhone, Release-iPhoneOS, Release-iphonesimulator etc folders.
For iPhone use Release-iphone (This also works for simulator).
Copy (not drag-drop) Release-iphone to your XCode project's root directory so that we have a local copy of framework.
Now iPhone drag-and-drop Release-iphone onto your XCode project. Make sure to check "Copy to .." option.
Note:
This Release-iphone folder contains two sub-folders: include and lib
include folder contains all the header .h files
lib folder contains compiled binary version file called libGPUImage.a
We now need to simply configure XCode to use .h and .a files.**
Select your project in the project explorer > Project name under Targets > select Build Phases > Expand Link Binary With Libraries
Add the libGPUImage.a to Link Binary With Libraries section. You may want to Right-click on libGPUImage.a then Open in Finder and finally drag-drop it.
While we are at it, also add the following GPUImage's dependent frameworks/ libraries
CoreMedia, CoreVideo, OpenGLES, AVFoundation, QuartzCore to Link Binary With Libraries section
Now, lets configure .h headers.
Select your project in the project explorer > Project name under Targets > select Build Settings > and type search paths to see search paths section.
Open Headers Search Paths by clicking on the value field.
Drag-and-drop the lib folder to that popup. Note: If it shows absolute path, change it to looks $(SRCROOT)/path/to/lib/. (You should have the framework relative to your xcode project see step 6).
Repeat 11 & 12 for Library Search Paths as well.
Additional tips: You can add .h files to Library Search Paths or Headers Search Paths, you can make them Recursive. I have a main root-folder called Dependencies folder where I keep all the dependencies like MySDK-framework including Release-iPhone. And I just have one search-path at the Dependencies (root folder) and made it recursive.
Did you follow all of the instructions from the Readme on the project page? From the installation instructions:
You'll also need to find the framework headers, so within your
project's build settings set the Header Search Paths to the relative
path from your application to the framework/ subdirectory within the
GPUImage source directory. Make this header search path recursive.
If you're seeing the above error, it means that you did not point the Header Search Paths at the right directory where you've installed GPUImage relative to your project, and / or did not click the checkbox to the left to make those search paths recursive.
I show some screenshots of where you need to go to set this in this answer, which explains something similar for the Core Plot framework. The same principles apply, only you need to find where you installed the GPUImage framework at.
I add relative path to "Header Search Paths", but there is still a error that is "not found".
Then, I add path to "User Header Search Paths", and it works.
May help you.
finally, I realized the KEY WORD is relativeļ¼
I put GPUImage source files in my project root dir:
before I solved the problem, I add Header Search Paths is:
$(PROJECT_DIR)/GPUImage/framework
$(PROJECT_DIR)/GPUImage/framework/iOS
and make them Recursive, but error is still there, So I changed Paths to:
GPUImage/framework and make it Recursive, then it works.
Hope it helps.