android_terminal/docs/Building.txt
Jack Palevich 64d16cf32c Fix documentation for setting up inital build.
Give a better error if the "android" tool is not on the path.
2012-07-14 20:17:45 -07:00

109 lines
3.2 KiB
Plaintext

Obtain the Software Needed to Build Android Terminal Emulator
-------------------------------------------------------------
To keep from typing "Android Terminal Emulator" over and over again, this
document will use the abbreviation "ATE" to stand for "Android Terminal
Emulator".
ATE is built using the Android SDK r18 or newer and the Android NDK r8 or
newer. You can download them from:
http://developer.android.com/sdk
If you want to build, edit, or debug with Eclipse you will also need to
install Eclipse 3.4 or newer, Java version, available from:
http://eclipse.org
After you install the SDK and the NDK, please build some of the samples that
come with the SDK and NDK in order to get a feel for using the SDK and the NDK.
Building ATE
------------
You can build ATE two ways
1) Using the "ant" command line tool
2) Using the Eclipse IDE
The "ant" way is convenient for automated builds. The Eclipse way is convenient
for debugging.
Building ATE using ant
----------------------
The first time you build using Ant you must run a one-time setup script
to set up the local.properties files for all the ant projects:
tools/update.sh
After that, you can build ATE by:
tools/build-debug
Then you can run ATE on your device or emulator by:
tools/pushAndRun
Building ATE with Eclipse
--------------------------
There are three steps to building ATE with Eclipse:
1) Build the project from the command line using "ant"
2) Create the Eclipse Project for the Application
3) Build the Java apk.
Build the project from the command line using "ant":
You need to build the project from the commmand line in order to generate the
shared libraries and Java JAR files used by Android Terminal Emulator.
Use the instructions in "Building ATE with ant", above.
Create the Eclipse projects:
Start Eclipse
From the menu choose File : New Project
Choose Android:Android Project as a project type
Press Next
Set Project Name: jackpal_androidterm_emulatorview
Choose "Create project from existing source"
Browse to the location of the libraries/emulatorview directory.
Press Finish
From the menu choose File : New Project
Choose Android:Android Project as a project type
Press Next
Set Project Name: AndroidTerm
Choose "Create project from existing source"
Browse to the location of the AndroidTerm source directory.
Press Finish
Edit the Eclipse project properties to include the emulatorview library:
1) Right-click on the "Term" project in the "Package Explorer" window.
2) Choose "Properties" from the drop-down menu.
3) Navigate to "Project References"
4) Check the check box "jackpal_androidterm_emulatorview"
5) Click OK
Build the Java apk:
This should happen automatically once you've created the Eclipse project.
Command Line Build Instructions
-------------------------------
You can build Android Terminal Emulator from the command line, instead of from
Eclipse. This is handy because it can be scripted.
1) Install the "ant" build system.
2) cd <the-android-terminal-emulator-directory>
3) ant clean
4) ant debug
5) Connect a device to your machine, or start the emulator
6) adb install -r bin/Term.apk
7) adb shell am start -n jackpal.androidterm/jackpal.androidterm.Term