Official Address: http://wiki.appcelerator.org/display/guides/Installing+on+Windows+7
This is the second article in this series. What about the first one? The first article has not been written .... I think of it only when I write it in half. I should first write a titanium introduction, architecture, use cases, advantages and disadvantages, etc. but since it is already half done, write it. Next, add the first article. simply put, titanium is an easy-to-use web development skill (JS, HTML, PHP, Ruby, etc.) to develop cross-platform local applications (mobile is a highlight !)
BTW: English level <CET4, and programming level is not the same. all articles are translated by searching dictionaries and practicing them according to your own understanding. it is not completely translated according to official documents. as for the frequency of translation, I can only say that I am not sure, because I often need to work overtime and can only translate in my spare time. if you have any errors or omissions, please correct them.
The software required for environment building is included in the attached compressed package (because the installation process often requires online updates, I put a XX door in the package that dropped the Crab and crab)
Software packaging: http://u.115.com/file/f1a110bb80
---- By night rain to North
QQ: 231175891
·Summary
This tutorial will teach you how to build a titanium Development Environment on window7 step by step (because I have no conditions to test the IOS environment on my computer, so here I will focus on Android and IOS, after purchasing a new computer, you can install the virtual machine and then add the IOS part ). after reading the tutorial, you should learn the following:
· Install titanium to run all the software on which it depends
· Correctly configure all dependent Environment Variables
· Create and run a project
·Preparations
O Log on with an Administrator Account
It is best to use the Administrator account to log on to window7 to avoid problems, because many operations such as installing components, configuring environment variables, and installing updates require administrator permissions.
Note: All subsequent operations in this tutorial are performed under the administrator privilege! If some operations do not work, close the software and run it as an administrator.
OProgram directory description
The following table lists the directories of all the software required by titanium (which will be used when environment variables are configured later. This does not mean that installation must be performed according to the following directory, however, the following installation directory is tested in practice (I also installed it in this way). If you change the installation directory, You need to configure the directory in the subsequent installation steps, you need to change it accordingly.
Python |
C: \ Program Files \ python27 |
Git |
C: \ Program Files \ git |
Scons |
C: \ Program Files \ python27 \ scripts |
Sun/Oracle JDK |
C: \ Program Files \ Java \ jdk1.6.0 _ 23 |
Android SDK tools |
C: \ Program Files \ Android-SDK-Window |
Titanium developer |
C: \ Program Files \ titanium developer |
Titanium mobile sdks |
% Programdata % \ titanium \ mobilesdk \ Win32 |
On window7, the environment variable % programdata % usually refers to c: \ programdata (XP seems to be Documents and Settings ??)
OEnvironment variable settings
Set environment variables. If your software installation directory is different from the one in the tutorial, remember to change it to your own installation directory.
If the variable name already exists, click Edit and separate it with semicolons. If the variable name does not exist, click New.
· How to Set environment variables in window7
Control Panel-> System
Advanced System settings
Environment Variable
· Java environment variables (reapply them once. Do not copy the variable values. The installation directory should prevail)
Variable name |
Variable value |
Java_home |
C: \ Program Files \ Java \ jdk1.6.0 _ 24 |
Path |
% Java_home % \ bin; % java_home % \ JRE \ bin |
Classpath |
.; % Java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. Jar |
· Android Environment Variables
Variable name |
Variable value |
Android_sdk |
C: \ Program Files \ Android-SDK-Windows |
· The following are all to be added to the PATH variable (you can also remember to install the Directory and copy the settings after each software installation to prevent typo, I will not remind you when I download the software)
Software name |
Variable name |
Variable value |
Python |
Path |
C: \ Program Files \ python27 |
Git |
Path |
C: \ Program Files \ git |
Scons |
Path |
C: \ Program Files \ python27 \ scripts |
Sun/Oracle JDK |
Path |
C: \ Program Files \ Java \ jdk1.6.0 _ 23 |
Android SDK tools |
Path |
C: \ Program Files \ Android-SDK-Window |
·Start to install the dependent environment (there is nothing to talk about here, it's all graphs. You can see it later)
All files can be downloaded one by one, or packaged by me. because my computer environment has been set up and I forgot to install it, the following installation process uses official tutorials. "(x86)" in the installation path is ignored.
OInstall Python
JDK 6 must be installed in python2.6 or later versions, and scons must be installed in 32-bit versions (as described later). pythonhttp: // www.python.org/download/
Install all components
O install git
: Http://git-scm.com/download
Install the following components
O install scons (which is optional on the official website, but does it seem like an error occurs when I do not install scons ?)
Scons is a build tool, similar to classic make Utility (what is this? I copied) to compile the titanium project.
Http://www.scons.org/download.php
If you have installed python, scon will automatically find the python installation directory.
Note: The sons Script directory is in the subdirectory of the python installation directory (note the environment variable setting). See
O install JDK
...
You can skip the source code in the installation package.
O install Android SDK tools
Android SDK tools is used to start the android Virtual Machine to test your titanium mobile application.
Official reference documents and:
Http://developer.android.com/sdk/requirements.html
Http://developer.android.com/sdk/installing.html
Run the installer
Make sure that JDK is installed.
After Android SDK tools is installed, open SDK manger (automatically open after installation)
To start configuring components (relatively slow ).
· Official SDK
Select the version you want to install, of course, the version supported by titaniun, view the address http://wiki.appcelerator.org/display/guides/Titanium+Compatibility+Matrix#TitaniumCompatibilityMatrix-AndroidSDK%2FTargetAndroidPlatform
If you don't know which version you want to install, just install it all.
Select accept all
Waiting for installation ...... Long Process
Installation complete. Select Yes.
Select close
· Third-party SDK
In the above steps, we have completed the installation of Google's official standard components. Next we will start to install third-party components that provide extended features such as maps.
Select available packages, select the check box in the blue box, select the package in the green box, and click Install selected
Select accept all and click Install
There is a long Installation Process
The installation is complete. Click Yes.
Close...
Delete all the current virtual devices in the Virtual Devices list (created automatically during titanium compilation and running)
· Configure ADB for titanium (set every android SDK update)
Because the file structure of Android sdkchanges in the nearest step, the location of adb.exe and adbwinapi. dll is moved (previously in the Tools Folder, platform-tools)
However, titanium.pdf only searches for adb.exe and adbwinapi. dll under the Tools Folder, so we can solve the problem using either of the following two methods ).
1. Copy these two files from platform-tools to tools (not a copy folder, do not be misled by my arrow !);
2. Create virtual links for the two files (too troublesome, but no need to copy the updates again );
Cd c: \ Program Files \ Android-SDK-Windows \ tools
Mklink adb.exe .. \ platform-tools \ adb.exe
Mklink adbwinapi. dll .. \ platform-tools \ adbwinapi. dll
O install titanium developer
All the dependent software has been installed. (check whether you forgot to configure the environment variables.) Next, go to the question and install titanium developer.
: Http://www.appcelerator.com/products/download/
· Install titanium developer
During the installation process, you need to download the SDK from the server! Please use the more crab tool in the compressed package (XX door );
· Configure titanium developer
Run the software and register (or log on) the Account
Click the red button to configure the android SDK directory
· Updated titanium developer
If a new SDK update is available, a prompt is displayed in the upper right corner.
O hello World!
Every time I access new things, I always look forward to Hello world. Now let's start creating a default mobile project and run it to see if the environment we set up earlier is successful.
Open titanium developer, select new project in the upper left corner, and select mobile in project type.
As shown in, our android SDK configuration is successful.
Enter project information
Created successfully. You can select the latest version of titanium SDK by default.
Switch to the Test & package tab and select the android SDK version and screen type.
Click the launch button to start the android Virtual Machine and automatically install our project to the virtual machine. You can select the content to display in the filter console.
Open our application
It's easy to run smoothly, because I am also a cainiao.
Next, we will start to translate some instance tutorial articles.
Software packaging: http://u.115.com/file/f1a110bb80