Multiple Sencha CMD on Mac - sencha-touch

How can we setup multiple Sencha cmds on Mac?
I am working with various versions of Sencha & I need to work with multiple Sencha cmd versions.
Right now I have to install/uninstall each time I need to switch to a different version.

You can install multiple versions of Sencha using the command line as follows:
$ SenchaCmd-6.x.app/Contents/MacOS/JavaApplicationStub -q -dir /home/user/SC-6.x
The output of the installation will now be on /home/user/SenchaCmd-6.x.y.z. Use syslink or custom aliases to switch between multiple versions.

Related

Compile lime-legacy on RPi

I am trying to run some code on RPi2 and unfortunately I am forced (thanks to haxeui) to use legacy version of the lime. There is no precompiled version for RPI, so I have to build it on my own.
Trying to run hxcpp build in on legacy/project ends up with error, that options file is not provided.
Second thing I tried is executing
lime rebuild linux -Dlegacy -Drpi -v
But it seems, that legacy flag get overridden with the rpi as no legacy file is created.
I am using git version of lime/openfl/haxe/hxcpp on latest rasbpian which I compiled thanks to the http://www.gepatto.nl/get-piratepig-running-on-a-raspberry-pi-2-with-raspbian-jessie/ tutorial.
How can I run build with both legacy and rpi flags?
thanks
Via OpenFL forum, current dev branches does no longer support legacy, yo you need to switch to openfl3 branch for openfl and master branch for lime.

sencha generate app failing from INSIDE SDK FOLDER

I issued this command:
sencha generate app LaBucaDiSanMatteo c:\xampp\htdocs\LaBucaDiSanMatteo
from inside SDK folder (c:\touch-2.3.1).
I got:
[INF] Workspace does not have framework null at C:\xampp\htdocs\LaBucaDiSanMatteo ... copying
[ERR] Failed to determine framework name. Please ensure this command was issued from either a framework or application directory
I'm using Sencha Cmd v4.0.2.67
Solved by myself.
Sencha CMD works only with the GPL version. Not working with the free commercial version.
I downloaded the first by mistake. I discovered the problem comparing the 2.3 with the old 2.2.1 (luckily I kept a copy).

This app was last modified by a newer version of Sencha Cmd - version mismatch

I'm trying to add the sencha cmd production package into my build process. But the final step when I need to package the app fails with the above error.
What I don't understand is this is a newly built application fresh from the SVN repo. The sencha cmd is the latest as I've just upgraded. So my question is when it states that the app was last modified by a newer version of sencha cmd is it lying to me?
2 things which aren't correct:
The app can't have been modified by a newer version because I've
just upgraded the build machine version of sencha cmd to the newest
version.
The app has been created by Sencha cmd in the past, but
this would have been older than the current one on the build
machine.
So I'm left baffled how to resolve this. How does Sencha Cmd 'know' that the app was last modified by a different version anyway? Is there some file within my \app folder which can be fudged so that it thinks the version is the latest? And what has the Sencha Cmd got to do with my application code-base anyway?
You can run the new Cmd version in update mode. I think this is really intended to update the Sencha Touch version, but if you just point it at the current version (2.1) then it will just update itself.
So, for example, run the line below with the latest Cmd:
sencha app upgrade [directory where 2.1 is]
Make sure you take a copy of your app.js first though, as the new version mangles this - just put your old one back after update. Also be aware that it will update your "Touch" directory, so make sure this is backed up as well.
Once the update has been run and you've put the app.js file back, your project should now build with the latest cmd.
If you have created/build your app using Sencha Cmd you will have related information (workspace.cmd.version, app.cmd.version) in following files:
PROJECT_ROOT/touch/cmd/sencha.cfg // This is SDK requirements
PROJECT_ROOT/.sencha/workspace/sencha.cfg // This is workspace build config
PROJECT_ROOT/.sencha/app/sencha.cfg // This is app build config
You can try fudging Cmd version in these files and let us know if it works :)
After doing sencha app upgrade --noframework, make sure to also run "sencha app refresh" to update .sencha metadata.
This misleading error message refers to a version change of Sencha's Cmd tool on the machine you are using. You can upgrade the Cmd scaffolding with the following command:
sencha app upgrade --noframework
From: 'sencha help app upgrade'
Options
* --noframework, -no - Upgrade only the Sencha Cmd scaffolding and not the SDK
Definitely back up your app before upgrading. The upgrade command will warn you about conflicts that need to be resolved (such as custom changes to app.js). When you open those files the differences will be noted in a standard diff format:
<<<<<<< Generated
/*
This file is generated and updated by Sencha Cmd. You can edit this file as
needed for your application, but these edits will have to be merged by
Sencha Cmd when it performs code generation tasks such as generating new
models, controllers or views and when running "sencha app upgrade".
Ideally changes to this file would be limited and most work would be done
in other places (such as Controllers). If Sencha Cmd cannot merge your
changes and its generated code, it will produce a "merge conflict" that you
will need to resolve manually.
*/
...
>>>>>>> Custom
...
Resolve the conflicts (remove the >>>>>> X lines and make sure the right lines are included in your file) and you should be all set. The most likely file to have a conflict is app.js - it'd be a good idea to compare your backed up version of that file with your modified version to be confident of the changes.
This seems to mean that all developers working on the application need to run the same Cmd version, so keep that in mind as well.

Using Sencha Command in Aptana

Is there an existing solution for using Sencha command (to create app or controllers etc...) directly from the Aptana IDE. Any help will be welcome...
No, there is no existing solution for that. However, you can anyway create an app or files with sencha command. And that the process is pretty simple.
Guide for reference: Sencha command

Sencha Touch 2: Cannot find module `/sencha-sdk-dir/command/sencha.js`

I am on Arch Linux x64 with Sencha Touch 2 x64 installed. From the SDK directory, I ran ./sencha
[jiewmeng#JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
[WARN] The current working directory (/opt/SenchaSDKTools-2.0.0-beta3) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
Sencha Command v2.0.0 Beta 3
Copyright (c) 2012 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 locale generate a template locale file from source
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.
I fixed that by adding a file .senchasdk with just "." init (as I figued Google-ing), but now I get
[jiewmeng#JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/opt/SenchaSDKTools-2.0.0-beta3/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)
Whats wrong?
I solve this problem just adding the SDK path as a System Variable, and the run the command inside the sencha library folder, not the SDK folder.
I was getting the same warning as:
[jiewmeng#JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
[WARN] The current working directory (/opt/SenchaSDKTools-2.0.0-beta3) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
Sencha Command v2.0.0 Beta 3
Copyright (c) 2012 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 locale generate a template locale file from source
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....
Then I downloaded the Sencha-Touch-2.0.1.1-gpl and extracted the contents to my web-root (i.e., /var/www/sencha-touch-2.0.1.1), and lastly downloaded the SenchaSDKTools and installed it via terminal as root user as follows:
root#user:/your/directory/where yo downloaded the sdk tool# ./SenchaSDKTool-2.0.1-beta3.run
I then waited for the installer to unzip the file and selected the installation directory as same where I put the Sencha-Touch library and the we have the following:
root#user:/var/www/sencha-touch-2.0.1.1# ./sencha
Sencha Command v2.0.2
Copyright (c) 2012 Sencha Inc.
.. and that is it people happy coding in sencha :-)
#todotresde Could you please share a full recipe for how to configure this on a Mac OS X.
I've just downloaded and installed the Sencha SDK in the /Applications folder, but I would hate to populate that folder with Sencha applications as instructed in the SenchaDocs at
http://docs.sencha.com/touch/2-0/#!/guide/command
cd /path/to/sencha-touch-2-sdk
sencha
The SDK install adds the SDK path variable to ~/.bash_profile
export PATH=/Applications/SenchaSDKTools-2.0.0-beta3:$PATH
export SENCHA_SDK_TOOLS_2_0_0_BETA3="/Applications/SenchaSDKTools-2.0.0-beta3"
I see some good pointers here:
http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap/
As per a standard Sencha application architecture, download the SDK and then place (or symlink) it within the lib directory, named touch. We will be putting our own code in the app directory
IMPORTANT: When you are developing or experimenting, it's fine to simply place the whole SDK inside the lib folder like this. But when deploying, make sure that only the required JavaScript and CSS files remain in that folder, and remove the rest of the SDK. You do not want to compile and distribute the entire Sencha Touch SDK with your app.
First you add the SenchaSDK folder to you path,
export PATH=$PATH:/your/path/to/SenchaSDK
then you set the SENCHA_SDK_TOOLS_2_0_0_BETA3 environment variable,
export SENCHA_SDK_TOOLS_2_0_0_BETA3=/your/path/to/SenchaSDK
Now you go to your sencha library directory, like /your/path/to/sencha-touch-2.0.1.1, and you should be able to run the sencha command with no problem.