一、环境: 电脑环境:ubuntu kylin 15.04 jre ,version 1.7 explorer,chrome ruby:2.1,sudo apt-get install ruby2.1 touch framework:http://cdn.sencha.com/touch/sencha-touch-2.2.1-gpl.zip sencha touch cmd:http://cdn.sencha.com
一、环境:
电脑环境:ubuntu kylin 15.04
jre ,version 1.7
explorer,chrome
ruby:2.1,sudo apt-get install ruby2.1
touch framework:http://cdn.sencha.com/touch/sencha-touch-2.2.1-gpl.zip
sencha touch cmd:http://cdn.sencha.com/cmd/6.0.2/no-jre/SenchaCmd-6.0.2-linux-amd64.sh.zip
touch doc:http://cdn.sencha.com/downloads/docs/touch-docs-2.2.1.zip
二、配置环境变量:
ubuntu上的环境变量配置与windows上不同,主要是jre,ruby,sencha cmd的配置,因为一直做开发,所以jre已经配置好,ruby则直接由命令:sudo apt-get install ruby2.1 配置好,主要是sencha cmd 的环境变量的配置:
/etc/profile,用vi或gedit编辑,在最后加上一段:
# sencha export SENCHA_HOME=/home/your_pc_name/software/SenchaCmd/6.0.2.14 export PATH=$SENCHA_HOME:$PATH
配置好环境变量记得验证一下:
1.jre,
~$ java -version java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
2.ruby
~$ ruby -v ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]
3.sencha
sencha Sencha Cmd v6.0.2.14 Sencha Cmd provides several categories of commands and some global switches. In most cases, the first step is to generate an application based on a Sencha SDK such as Ext JS or Sencha Touch: sencha -sdk /path/to/sdk generate app MyApp /path/to/myapp Sencha Cmd supports Ext JS 4.1.1a and higher and Sencha Touch 2.1 and higher. To get help on commands use the help command: sencha help generate app For more information on using Sencha Cmd, consult the guides found here: http://docs.sencha.com/cmd/ Options * --beta, -be - Enable beta package repositories * --cwd, -cw - Sets the directory from which commands should execute * --debug, -d - Sets log level to higher verbosity * --info, -i - Sets log level to default * --nologo, -n - Suppress the initial Sencha Cmd version display * --plain, -pl - enables plain logging output (no highlighting) * --quiet, -q - Sets log level to warnings and errors only * --sdk-path, -sd - The location of the SDK to use for non-app commands * --strict, -st - Treats warnings as errors, exiting with error if any warnings are present * --time, -ti - Display the execution time after executing all commands Categories * app - Perform various application build processes * compass - Wraps execution of compass for sass compilation * compile - Compile sources to produce concatenated output and metadata * cordova - Quick init Support for Cordova * diag - Perform diagnostic operations on Sencha Cmd * fs - Utility commands to work with files * generate - Generates models, controllers, etc. or an entire application * manager - Commands for interacting with Sencha Web Application Manager. * manifest - Extract class metadata * package - Manages local and remote packages * phonegap - Quick init support for PhoneGap * repository - Manage local repository and remote repository connections * template - Commands for working with templates * theme - Commands for low-level operations on themes * web - Manages a simple HTTP file server Commands * ant - Invoke Ant with helpful properties back to Sencha Cmd * audit - Search from the current folder for Ext JS frameworks and report their license * build - Builds a project from a legacy JSB3 file. * config - Load a properties file or sets a configuration property * help - Displays help for commands * js - Executes arbitrary JavaScript file(s) * switch - Manage the active Sencha Cmd version * upgrade - Upgrades Sencha Cmd * which - Displays the path to the current version of Sencha Cmd
至此,Sencha Touch 的环境完全搭建完成了,当然还要配置web服务器了,这个在下一节中创建app中继续