Ubuntu下配置qooxdoo

来源:互联网 发布:大数据上市公司排名 编辑:程序博客网 时间:2024/06/09 22:22

qooxdoo 配置说明


qooxdoo是一个开源的ajax框架(还有很多类似的ajax框架,都很不错),研究它主要是因为eyeos用的就是这个框架,而eyeos是一个非常棒的在线OS,好了,直接切入正题:


1.

在qooxdoo官网下载最新版:http://qooxdoo.org/download 我下的是1.5版的SDK


2.

由于qooxdoo需要依赖python库,所以windows的同学们要自行先装上python库,在此不再赘述。而本人使用的是Ubuntu 11.04,默认已经装上了python库了,所以这步省略(大部分比较新的Linux发行版都默认自带了python库)



3.

解压,然后 cd /tool/bin,有一个create-application.py,执行如下命令:

./create-application.py --name=firstAPP --out=./      (--name表示生成的app的名称,--out表示生成路径)

以下是命令执行后的输出:

>>> Copy skeleton into the output directory: ./firstAPP
>>> Patching file './firstAPP/Manifest.json'
>>> Patching file './firstAPP/generate.py'
>>> Patching file './firstAPP/config.json'
>>> Patching file './firstAPP/source/index.html'
>>> Patching file './firstAPP/source/class/firstapp/Application.js'
>>> Patching file './firstAPP/source/class/firstapp/theme/Font.js'
>>> Patching file './firstAPP/source/class/firstapp/theme/Color.js'
>>> Patching file './firstAPP/source/class/firstapp/theme/Decoration.js'
>>> Patching file './firstAPP/source/class/firstapp/theme/Appearance.js'
>>> Patching file './firstAPP/source/class/firstapp/theme/Theme.js'
>>> Patching file './firstAPP/source/class/firstapp/simulation/DemoSimulation.js'
>>> Patching file './firstAPP/source/class/firstapp/test/DemoTest.js'
>>> DONE


这时我们会发现在当前目录下生成了firstAPP目录:

cd firstAPP


然后执行如下命令:

./generate.py source-all

以下是命令执行后的输出(第一次执行这个命令会花比较长的时间,不过以后就好了):

----------------------------------------------------------------------------
    Initializing: firstAPP
----------------------------------------------------------------------------
>>> Processing configuration


----------------------------------------------------------------------------
    Executing: source-all::source-all-script
----------------------------------------------------------------------------
>>> Scanning libraries  


>>> Collecting classes   
  - Processing explicitly configured includes/excludes...
>>> Generate application
  - Processing 2 locales  
  - Generate packages  
  - Generate loader script
>>> Done (2m44.54)



4.

命令执行完后会在source下多一个script文件夹,firstapp.js就是我们需要的js啦(还没写任何代码,这个js就有100多k了~~),

打开source/index.html文件,贴个图(我用firefox打开是空白,用chrome打开就可以了):




点button就会弹出一个hello world的alert。



下面我们来自动生成build:

在之前生成的firstAPP下执行 ./generate.py build 命令,等待一会后就会生成build文件夹,里面的内容和source文件夹里的差不多,只不过打开imdex.html比source下的快很多,因为它是最终要部署的版本,去掉了很多debug。