OSDN Git Service

Remove non-working portugese translation.
[android-x86/packages-apps-AndroidTerm.git] / docs / Building.txt
1 Obtain the Software Needed to Build Android Term
2 ------------------------------------------------
3
4 Android is built using the Android SDK r08 or newer and the Android NDK r5 or newer.
5 You can downlaod them from:
6
7 http://developer.android.com/sdk
8
9 You will also need Eclipse 3.4 or newer, Java version, available from:
10
11 http://eclipse.org
12
13 After you install the SDK and the NDK, please build some of the samples that
14 come with the NDK in order to get a feel for using the SDK and the NDK.
15
16 Building Android Term
17 ---------------------
18
19 There are three parts to building Android Term:
20
21     1) Build the shared library
22     2) Create the Eclipse Project for the Application
23     3) Build the Java apk.
24
25 Build the shared library:
26
27     cd <the-android-terminal-emulator-directory>
28     <path-to-the-android-ndk>/ndk-build
29     
30   (Be sure to use the actual pathnames from your system. For example,
31    on my system I actually type the following:
32
33     cd ~/code/androidterm
34     ../android-ndk-r5/ndk-build
35
36 This should chug away for a while and ultimately produce the file
37
38 libs/armeabi/libandroidterm.so
39     
40 Create the Eclipse project:
41
42     Start Eclipse
43     From the menu choose File : New Project
44     Choose Android:Android Project as a project type
45     Press Next
46     Set Project Name: AndroidTerm
47     Choose "Create project from existing source"
48     Browse to the location of the AndroidTerm source directory.
49     Make sure the "Android 1.6" Target Name is checked.
50     Make sure the Min SDK Version is 4
51     Press Finish
52     
53     NOTE: When you Press Finish you may get the following error
54     
55         Invalid project description.
56         <path-to-your-project> overlaps the location of another
57         project: '<project>'
58         
59     This seems to be due to a bug in the Android SDK, where it
60     can't import projects that are located in the Eclipse "workspace"
61     directory. The work-around is to move the androidterm project
62     directory to a different location on your file system, so
63     that it is _not_ in the Eclipse "workspace" directory.
64
65 Build the Java apk:
66
67     This should happen automatically once you've created the Eclipse project.
68
69 Command Line Build Instructions
70 -------------------------------
71
72 You can build Android Terminal Emulator from the command line, instead of from
73 Eclipse. This is handy because it can be scripted.
74
75 1) Install the "ant" build system.
76 2) cd <the-android-terminal-emulator-directory>
77 3) ant clean
78 4) ant debug
79 5) Connect a device to your machine, or start the emulator
80 6) adb install -r bin/Term.apk
81 7) adb shell am start -n jackpal.androidterm/jackpal.androidterm.Term