Sencha SDK Tools v3 beta无法升级我的v2.0.1 Sencha-Touch应用程序

时间:2012-09-27 18:56:38

标签: extjs sencha-touch-2

我一直在努力使用新的Sencha SDK Tools v3 Beta(是的,我知道,测试版),这样我就可以优化我的sencha-touch项目,而且效果不太好。

我的目标是将我的项目优化合并到我们的持续集成构建中 - 在构建期间运行下面的opmitimaztion代码:

sencha app build -e testing

我已经在我的Mac OS X机器上工作,并且正在使它在Unix构建服务器(通过Jenkins)上工作。但是,由于我的应用程序版本,sencha-touch v2.0.1和Sencha Cmd v3.0.0.141之间的版本不兼容,它失败了。

我的应用程序非常小,我想,很好,我会根据他们方便的说明使用Sencha Cmd v3.0.0.141升级我的v2.0.1应用程序。根据文档,我需要做的就是:

cd [my sencha-touch app dir]
sencha upgrade /path/to/the/latest/sencha-touch/sdk

升级过程做了做了什么,请看下面的输出,但我的应用程序现在已经坏了,因为它无法找到依赖项:

GET http://localhost:8080/product-selector/event/publisher/Dom.js?_dc=1348770723554 404 (Not Found) sencha-touch.js:7986
GET http://localhost:8080/product-selector/event/Dispatcher.js?_dc=1348770723544 404 (Not Found) sencha-touch.js:7986
Uncaught Error: [Ext.Loader] Failed loading './event/publisher/Dom.js', please verify that the file exists sencha-touch.js:8328
Uncaught Error: [Ext.Loader] Failed loading './event/Dispatcher.js', please verify that the file exists sencha-touch.js:8328

任何人都知道答案吗? 404'd文件,Dom.js和Dispatcher.js,位于升级过程中创建的“touch”目录中。奇怪的是,代码没有查看它,它只是看着根。我检查了app.json文件以查看是否有任何需要更正的内容指向'touch'目录,但没有找到任何内容。这是升级命令的输出:

~/work/product-selector/web-app (feature/upgrade ✔) ᐅ sencha app upgrade ~/frameworks/sencha/sencha-touch
Sencha Cmd v3.0.0.141
[INFO ]     init-properties:
[INFO ]     init-antcontrib:
[INFO ]     init-sencha-command:
[INFO ]     init:
[INFO ]     -before-app-upgrade:
[INFO ]     app-upgrade-impl:
[INFO ]     building application
[INFO ]          [move] Moving 1342 files to /Volumes/Magnetic/Users/x/work/product-selector/web-app/./.sencha_backup/2.0.1.1/sdk
[INFO ]     Renamed /Volumes/Magnetic/Users/x/work/product-selector/web-app/./sdk to /Volumes/Magnetic/Users/x/work/product-selector/web-app/./.sencha_backup/2.0.1.1 for backup
[INFO ]          [copy] Copying 5 files to /Volumes/Magnetic/Users/x/work/product-selector/web-app/./.sencha_backup/2.0.1.1
[INFO ]     Creating new application structure
[INFO ]     init-properties:
[INFO ]     init-antcontrib:
[INFO ]     init-sencha-command:
[INFO ]     init:
[INFO ]     -before-generate-workspace:
[INFO ]     generate-workspace-impl:
[INFO ]     -before-copy-framework-to-workspace:
[INFO ]     copy-framework-to-workspace-impl:
[INFO ]          [copy] Copying 1150 files to /Volumes/Magnetic/Users/x/work/product-selector/web-app/touch
[INFO ]          [copy] Copied 187 empty directories to 1 empty directory under /Volumes/Magnetic/Users/x/work/product-selector/web-app/touch
[INFO ]          [copy] Copying 1 file to /Volumes/Magnetic/Users/x/work/product-selector/web-app/touch
[INFO ]          [copy] Copying 1 file to /Volumes/Magnetic/Users/x/work/product-selector/web-app/touch
[INFO ]     -after-copy-framework-to-workspace:
[INFO ]     copy-framework-to-workspace:
[INFO ]     -after-generate-workspace:
[INFO ]     generate-workspace:
[INFO ]     init-properties:
[INFO ]     init-antcontrib:
[INFO ]     init-sencha-command:
[INFO ]     init:
[INFO ]     -before-generate-app:
[INFO ]     generate-app-impl:
[INFO ]     Generating new packager.json file using native packager
[INFO ]     copy-sdk:
[INFO ]     -after-generate-app:
[INFO ]     generate-app:
[INFO ]     Updating references to framework files
[INFO ]     -after-app-upgrade:
[INFO ]     app-upgrade:

最后注意:升级过程不是我的主要目标,请记住我只想在构建服务器上自动优化构建。我已经尝试在我的Unix构建服务器上安装旧版本的SDK,但它在Apple笔记本电脑上甚至没有与相同版本相同的命令。所以,我的第二个问题是:

无论如何,我可以在sencha touch 2应用程序中自动执行资源优化吗?例如,这是通过詹金斯。

1 个答案:

答案 0 :(得分:0)

看起来你正在使用“Sencha Cmd v3 Beta”,而不是“Sencha SDKTools v2.0 beta 3”,是的,这是有区别的。

SDK工具:http://www.sencha.com/products/sdk-tools/download/ Sencha CMD:http://www.sencha.com/forum/showthread.php?243153-Sencha-Cmd-V3-Beta(最新链接)

我认为Cmd可能与Sencha Touch完全不兼容,对于ExtJS和Architect来说更是如此。 Cmd我认为应该取代SDKTools ....为什么他们同时处于测试阶段,为什么他们被命名为不同,为什么他们改变名字对我来说是一个巨大的愚蠢。

当您在终端中键入“sencha”时,您应该获得类似于v2.0 beta 3的“Sencha Command v2.0.2”和适用于v3.0 beta的“Sencha Cmd v3.0”。