我在安装了Sencha Touch 2 x64的Arch Linux x64上。在SDK目录中,我运行了./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.
我通过添加只有“。”的文件.senchasdk
来解决这个问题。 init(正如我所说的Google-ing),但现在我得到了
[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)
什么错了?
答案 0 :(得分:1)
我解决了这个问题,只是将SDK路径添加为系统变量,并在sencha库文件夹中运行命令,而不是SDK文件夹。
答案 1 :(得分:1)
我收到了同样的警告:
[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....
然后我下载了Sencha-Touch-2.0.1.1-gpl并将内容提取到我的web-root(即/var/www/sencha-touch-2.0.1.1
),最后下载了SenchaSDKTools并通过终端以root用户身份安装,如下所示:
root@user:/your/directory/where yo downloaded the sdk tool# ./SenchaSDKTool-2.0.1-beta3.run
然后我等待安装程序解压缩文件并选择安装目录,就像我放置Sencha-Touch库一样,我们有以下内容:
root@user:/var/www/sencha-touch-2.0.1.1# ./sencha
Sencha Command v2.0.2
Copyright (c) 2012 Sencha Inc.
..那就是人们在sencha中编码的快乐: - )
答案 2 :(得分:0)
@todotresde您能否分享完整的配方,了解如何在Mac OS X上配置它。
我刚刚在/ Applications文件夹中下载并安装了Sencha SDK,但我不想按照SenchaDocs中的说明使用Sencha应用程序填充该文件夹。 http://docs.sencha.com/touch/2-0/#!/guide/command
cd / path / to / sencha-touch-2-sdk
煎茶
SDK安装将SDK路径变量添加到〜/ .bash_profile
export PATH = / Applications / SenchaSDKTools-2.0.0-beta3:$ PATH
导出SENCHA_SDK_TOOLS_2_0_0_BETA3 =“/ Applications / SenchaSDKTools-2.0.0-beta3”
我在这里看到一些好的指示:
http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap/
根据标准的Sencha应用程序架构,下载SDK,然后将其放置(或符号链接)在lib目录中,名为touch。我们将把我们自己的代码放在app目录中
重要提示:在开发或试验时,只需将整个SDK放在lib文件夹中就可以了。但是在部署时,请确保只有所需的JavaScript和CSS文件保留在该文件夹中,并删除SDK的其余部分。您不希望使用您的应用程序编译和分发整个Sencha Touch SDK。
答案 3 :(得分:0)
首先,将SenchaSDK文件夹添加到路径
export PATH=$PATH:/your/path/to/SenchaSDK
然后设置SENCHA_SDK_TOOLS_2_0_0_BETA3环境变量,
export SENCHA_SDK_TOOLS_2_0_0_BETA3=/your/path/to/SenchaSDK
现在你去你的sencha库目录,比如/your/path/to/sencha-touch-2.0.1.1,你应该能够毫无问题地运行 sencha 命令。 / p>