setup titanium command line interface

访问量: 1327

eclipse 虽好,但是我只喜欢 命令行。 因为IDE 把太多的debug细节都隐藏了。与其让eclipse输出debug信息,不如直接让我自己动手。

refer to:  http://docs.appcelerator.com/titanium/3.0/#!/guide/Setting_up_the_Titanium_CLI-section-37520113_SettinguptheTitaniumCLI-InstalltheCLI

1. $ npm install -g titanium

2. $ titanium login (记得先注册)

sg552@siwei-linux-notebook:/workspace$ titanium login
Titanium Command-Line Interface, CLI version 3.4.0, Titanium SDK version 3.4.0.GA
Copyright (c) 2012-2014, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/

Username: shensiwei@sina.com
Password: ******
Logged in successfully

3. $ titanium sdk install 

4. $ titanium setup   然后会跳出很多配置项供你选择.

──────────────────────┤ Main Menu ├───────────────────────

   1)  quick    Quick Setup
   2)  check    Check Environment
   3)  user     User Information
   4)  app      New App Defaults
   5)  network  Network Settings
   6)  cli      Titanium CLI Settings
   7)  sdk      Titanium SDK Settings
   8)  android  Android Settings
   9)  exit     Exit
Where do you want to go?   

最重要的是 第二个项目, check, 它会很详细的告诉你哪些东西安装好了,哪些木有.

──────────────────┤ Check Environment ├───────────────────

Node.js
  ★  node               new version v0.10.33 available! (currently v0.10.32)
  ★  npm                new version v2.1.9 available! (currently v1.4.28)
 
Titanium CLI
  ★  cli                new version v3.4.1 available (currently v3.4.0)
 
Titanium CLI Dependencies
  ✓  async              up-to-date (v0.2.10)
  ✓  colors             up-to-date (v0.6.2)
  ✓  fields             up-to-date (v0.1.17)
  ✓  humanize           up-to-date (v0.0.9)
  ✓  jade               up-to-date (v0.35.0)
  ✓  longjohn           up-to-date (v0.2.4)
  ✓  moment             up-to-date (v2.4.0)
  ✓  node-appc          up-to-date (v0.2.14)
  ✓  optimist           up-to-date (v0.6.1)
  ✓  request            up-to-date (v2.27.0)
  ✓  semver             up-to-date (v2.2.1)
  ✓  sprintf            up-to-date (v0.1.4)
  ✓  temp               up-to-date (v0.6.0)
  ✓  winston            up-to-date (v0.6.2)
  ✓  wrench             up-to-date (v1.5.8)
 
Titanium SDK
  ★  latest sdk         new version v3.4.1.GA available! (currently v3.4.0.GA)
  ✓  selected sdk       up-to-date (v3.4.0.GA)
 
Android Environment
  ✓  sdk                installed (/workspace/android-sdk-linux)
  ✓  tools              installed (v23.0.2)
  ✓  platform tools     installed (v20)
  ✓  build tools        installed (v20)
  ✓  adb                installed /workspace/android-sdk-linux/platform-tools/adb
  ✓  android            installed /workspace/android-sdk-linux/tools/android
  ✓  emulator           installed /workspace/android-sdk-linux/tools/emulator
  ✓  mksdcard           installed /workspace/android-sdk-linux/tools/mksdcard
  ✓  zipalign           installed /workspace/android-sdk-linux/build-tools/20.0.0/zipalign
  ✓  aapt               installed /workspace/android-sdk-linux/build-tools/20.0.0/aapt
  ✓  aidl               installed /workspace/android-sdk-linux/build-tools/20.0.0/aidl
  ✓  targets            installed (3 found)
  ✓  avds               installed (1 found)
  !  ndk                Android NDK not found
 
Java Development Kit
  ✓  jdk                installed (v1.7.0)
  ✓  java               installed /workspace/coding_tools/jdk1.7.0_67/bin/java
  ✓  javac              installed /workspace/coding_tools/jdk1.7.0_67/bin/javac
  ✓  keytool            installed /workspace/coding_tools/jdk1.7.0_67/bin/keytool
  ✓  jarsigner          installed /workspace/coding_tools/jdk1.7.0_67/bin/jarsigner
 
Intel® Hardware Accelerated Execution Manager (HAXM)
  ✓  compatible         
  !  installed          not found; install HAXM to use Android x86 emulator
 
Network
  ✓  online             
  ✓  proxy server enabled 
  ✓  http request test  
  ✓  https request test 
 
Directory Permissions
  ✓  home directory     
  ✓  titanium config directory 
  ✓  titanium sdk install directory 
  ✓  temp directory     
 

最后,测试:  

$ titanium create --name MyFirstProject
$ cd MyFirstProject
$ titanium build

订阅/RSS Feed

Subscribe

分类/category