diff options
| author | Po Lu | 2023-08-12 20:58:13 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-12 20:59:10 +0800 |
| commit | 69a1a63ebda282830a75e774f2cedbb84893a109 (patch) | |
| tree | 0eb18c0374e1023263b365a0553e0f99b62e3411 /java | |
| parent | a4171e94667eb9e75053e77c092cdd57a0377bc0 (diff) | |
| download | emacs-69a1a63ebda282830a75e774f2cedbb84893a109.tar.gz emacs-69a1a63ebda282830a75e774f2cedbb84893a109.zip | |
; * java/INSTALL (LOCATING NECESSARY FILES): New section.
Diffstat (limited to 'java')
| -rw-r--r-- | java/INSTALL | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/java/INSTALL b/java/INSTALL index ef05b811989..7ee39a71e9a 100644 --- a/java/INSTALL +++ b/java/INSTALL | |||
| @@ -39,8 +39,7 @@ script like so: | |||
| 39 | Replacing the paths in the command line above with: | 39 | Replacing the paths in the command line above with: |
| 40 | 40 | ||
| 41 | - the path to the `android.jar' headers which come with the Android | 41 | - the path to the `android.jar' headers which come with the Android |
| 42 | SDK. They must correspond to Android version 13 (API level 33) or | 42 | SDK. They must correspond to Android version 13 (API level 33.) |
| 43 | later. | ||
| 44 | 43 | ||
| 45 | - the path to the C compiler in the Android NDK, for the kind of CPU | 44 | - the path to the C compiler in the Android NDK, for the kind of CPU |
| 46 | you are building Emacs to run on. | 45 | you are building Emacs to run on. |
| @@ -69,6 +68,57 @@ The generated package can be uploaded onto an SD card (or similar | |||
| 69 | medium) and installed on-device. | 68 | medium) and installed on-device. |
| 70 | 69 | ||
| 71 | 70 | ||
| 71 | LOCATING NECESSARY FILES | ||
| 72 | |||
| 73 | As illustrated above, building Emacs for Android requires the presence | ||
| 74 | three separate components of the Android SDK and NDK. Subsequent to | ||
| 75 | their installation, the contents of the Android development tools are | ||
| 76 | organized into several directories, of which those pertinent to the | ||
| 77 | Emacs compilation process are: | ||
| 78 | |||
| 79 | platforms | ||
| 80 | ndk | ||
| 81 | build-tools | ||
| 82 | |||
| 83 | The platforms directory contains one subdirectory for each API level | ||
| 84 | whose headers have been installed. Each of these directories in turn | ||
| 85 | includes the android.jar archive for that version of Android, also | ||
| 86 | necessary for compiling Emacs. | ||
| 87 | |||
| 88 | It is imperative that Emacs is compiled using the headers for the | ||
| 89 | exact API level that it is written for. This is currently API level | ||
| 90 | 33, so the correct android.jar archive is located within a directory | ||
| 91 | whose name begins with `android-33'. Minor revisions to the headers | ||
| 92 | are inconsequential towards the Emacs compilation process; if there is | ||
| 93 | a directory named `android-33-extN' (where N represents a revision to | ||
| 94 | the Android SDK), whether you provide `configure' with that | ||
| 95 | directory's android.jar or the android.jar contained within the | ||
| 96 | directory named `android-33' is of no special importance. | ||
| 97 | |||
| 98 | The ndk directory contains one subdirectory for each version of the | ||
| 99 | Android NDK installed. This directory in turn contains the C and C++ | ||
| 100 | compilation system. In contrast to the Java headers mentioned within | ||
| 101 | the previous paragraph, the version of the NDK used does not affect | ||
| 102 | Emacs to the extent the version of android.jar does. Having said | ||
| 103 | that, each version of the NDK only supports a limited range of API | ||
| 104 | levels; your choice of C compiler binary (or __ANDROID_API__) bears | ||
| 105 | upon the earliest version of Android the compiled package will | ||
| 106 | support. | ||
| 107 | |||
| 108 | In most cases, each subdirectory contains a folder named `toolchains', | ||
| 109 | holding an `llvm' directory and one directory for each GCC toolchain | ||
| 110 | supplied by the NDK. The C compiler is then positioned within | ||
| 111 | `prebuilt/*/bin' inside that directory. | ||
| 112 | |||
| 113 | The build-tools directory holds subdirectories containing the utility | ||
| 114 | programs used to convert class files output by the Java compiler to | ||
| 115 | the DEX format employed by Android. There is one subdirectory for | ||
| 116 | each version of the build tools, but the version you opt for is not of | ||
| 117 | paramount significance: if your version does not work, configure will | ||
| 118 | protest, so install a newer one. We anticipate that most recent | ||
| 119 | releases will work, such as those from the 33.0.x and 34.0.x series. | ||
| 120 | |||
| 121 | |||
| 72 | BUILDING WITH OLD NDK VERSIONS | 122 | BUILDING WITH OLD NDK VERSIONS |
| 73 | 123 | ||
| 74 | Building Emacs with an old version of the Android NDK requires special | 124 | Building Emacs with an old version of the Android NDK requires special |