mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-07 04:10:27 -08:00
* .gitignore: Add new files.
* INSTALL.android: Explain how to build Emacs for ancient
versions of Android.
* admin/merge-gnulib (GNULIB_MODULES): Add getdelim.
* build-aux/config.guess (timestamp, version):
* build-aux/config.sub (timestamp, version): Autoupdate.
* configure.ac (BUILD_DETAILS, ANDROID_MIN_SDK):
(ANDROID_STUBIFY): Allow specifying CFLAGS via ANDROID_CFLAGS.
Add new configure tests for Android API version when not
explicitly specified.
* doc/emacs/android.texi (Android): Add reference to ``Other
Input Devices''.
(Android File System): Remove restrictions on directory-files on
the assets directory.
* doc/emacs/emacs.texi (Top): Add Other Input Devices to menu.
* doc/emacs/input.texi (Other Input Devices): New node.
* doc/lispref/commands.texi (Touchscreen Events): Document
changes to touchscreen input events.
* doc/lispref/frames.texi (Pop-Up Menus): Likewise.
* etc/NEWS: Announce changes.
* java/Makefile.in: Use lib-src/asset-directory-tool to generate
an `directory-tree' file placed in /assets.
* java/debug.sh: Large adjustments to support Android 2.2 and
later.
* java/org/gnu/emacs/EmacsContextMenu.java (inflateMenuItems):
* java/org/gnu/emacs/EmacsCopyArea.java (perform):
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog):
* java/org/gnu/emacs/EmacsDrawLine.java (perform):
* java/org/gnu/emacs/EmacsDrawRectangle.java (perform):
* java/org/gnu/emacs/EmacsDrawable.java (EmacsDrawable):
* java/org/gnu/emacs/EmacsFillPolygon.java (perform):
* java/org/gnu/emacs/EmacsFillRectangle.java (perform):
* java/org/gnu/emacs/EmacsGC.java (EmacsGC):
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap):
(destroyHandle):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java (draw): Avoid
redundant canvas saves and restores.
* java/org/gnu/emacs/EmacsService.java (run):
* java/org/gnu/emacs/EmacsView.java (EmacsView):
(handleDirtyBitmap):
* java/org/gnu/emacs/EmacsWindow.java (changeWindowBackground)
(EmacsWindow): Make compatible with Android 2.2 and later.
* lib-src/Makefile.in (DONT_INSTALL): Add asset-directory-tool
on Android.:(asset-directory-tool{EXEEXT}): New target.
* lib-src/asset-directory-tool.c (struct directory_tree, xmalloc)
(main_1, main_2, main): New file.
* lib, m4: Merge from gnulib. This will be reverted before
merging to master.
* lisp/button.el (button-map):
(push-button):
* lisp/frame.el (display-popup-menus-p): Improve touchscreen
support.
* lisp/subr.el (event-start):
(event-end): Handle touchscreen events.
* lisp/touch-screen.el (touch-screen-handle-timeout):
(touch-screen-handle-point-update):
(touch-screen-handle-point-up):
(touch-screen-track-tap):
(touch-screen-track-drag):
(touch-screen-drag-mode-line-1):
(touch-screen-drag-mode-line): New functions.
([mode-line touchscreen-begin]):
([bottom-divider touchscreen-begin]): Bind new events.
* lisp/wid-edit.el (widget-event-point):
(widget-keymap):
(widget-event-start):
(widget-button--check-and-call-button):
(widget-button-click): Improve touchscreen support.
* src/alloc.c (make_lisp_symbol): Avoid ICE on Android NDK GCC.
(mark_pinned_symbols): Likewise.
* src/android.c (struct android_emacs_window): New struct.
(window_class): New variable.
(android_run_select_thread): Add workaround for Android platform
bug.
(android_extract_long, android_scan_directory_tree): New
functions.
(android_file_access_p): Use those functions instead.
(android_init_emacs_window): New function.
(android_init_emacs_gc_class): Update signature of `markDirty'.
(android_change_gc, android_set_clip_rectangles): Tell the GC
whether or not clip rects were dirtied.
(android_swap_buffers): Do not look up method every time.
(struct android_dir): Adjust for new directory tree lookup.
(android_opendir, android_readdir, android_closedir): Likewise.
(android_four_corners_bilinear): Fix coding style.
(android_ftruncate): New function.
* src/android.h: Update prototypes. Replace ftruncate with
android_ftruncate when necessary.
* src/androidterm.c (handle_one_android_event): Pacify GCC. Fix
touch screen tool bar bug.
* src/emacs.c (using_utf8): Fix compilation error.
* src/fileio.c (Ffile_system_info): Return Qnil when fsusage.o
is not built.
* src/filelock.c (BOOT_TIME_FILE): Fix definition for Android.
* src/frame.c (Fx_parse_geometry): Fix uninitialized variable
uses.
* src/keyboard.c (lispy_function_keys): Fix `back'.
* src/menu.c (x_popup_menu_1): Handle touch screen events.
(Fx_popup_menu): Document changes.
* src/sfnt.c (main): Improve tests.
* src/sfntfont-android.c (sfntfont_android_put_glyphs): Fix
minor problem.
(init_sfntfont_android): Check for
HAVE_DECL_ANDROID_GET_DEVICE_API_LEVEL.
* src/sfntfont.c (struct sfnt_font_desc): New fields `adstyle'
and `languages'.
(sfnt_parse_style): Append tokens to adstyle.
(sfnt_parse_languages): New function.
(sfnt_enum_font_1): Parse supported languages and adstyle.
(sfntfont_list_1): Handle new fields.
(sfntfont_text_extents): Fix uninitialized variable use.
(syms_of_sfntfont, mark_sfntfont): Adjust accordingly.
111 lines
4.1 KiB
Text
111 lines
4.1 KiB
Text
Installation instructions for Android
|
||
Copyright (C) 2023 Free Software Foundation, Inc.
|
||
See the end of the file for license conditions.
|
||
|
||
Please read the entirety of this file before attempting to build Emacs
|
||
as an application package which can run on Android devices.
|
||
|
||
When building from the source repository, make sure to read
|
||
INSTALL.REPO as well.
|
||
|
||
|
||
|
||
Android is an unusual operating system in that program binaries cannot
|
||
be produced on computers running Android themselves. Instead, they
|
||
must be built on some other computer using a set of tools known as the
|
||
``Android SDK'' (Software Development Kit) and the ``Android NDK''
|
||
(Native Development Kit). Appropriate versions of both must be
|
||
obtained to build GNU Emacs; after being built, the generated binaries
|
||
will work on almost all Android devices. This document does not
|
||
elaborate on how both sets of tools can be obtained. However, for
|
||
your freedom's sake, you should use the Android SDK provided by the
|
||
Debian project.
|
||
|
||
In addition to the Android SDK and Android NDK, Emacs also requires
|
||
the Java compiler from OpenJDK 1.7.0 to be installed on your system.
|
||
|
||
Once all of those tools are obtained, you may invoke the `configure'
|
||
script like so:
|
||
|
||
./configure --with-android=/path/to/android.jar \
|
||
ANDROID_CC=/path/to/android/ndk/cc \
|
||
SDK_BUILD_TOOLS=/path/to/sdk/build/tools
|
||
|
||
Replacing the paths in the command line above with:
|
||
|
||
- the path to the `android.jar' headers which come with the Android
|
||
SDK. They must correspond to Android version 13 or later.
|
||
|
||
- the path to the C compiler in the Android NDK, for the machine you
|
||
are building Emacs to run on.
|
||
|
||
- the path to the directory in the Android SDK containing binaries
|
||
such as `aapt' and `d8'. These are used to build the application
|
||
package.
|
||
|
||
After the configuration process completes, you may run:
|
||
|
||
make all
|
||
|
||
Once `make' finishes, there should be a file in the `java' directory
|
||
named along the lines of:
|
||
|
||
emacs-<version>-<api-version>-<abi>.apk
|
||
|
||
where <api-version> is the oldest version of Android that the package
|
||
will run on, and <abi> is the type of Android machine the package was
|
||
built for.
|
||
|
||
The generated package can be uploaded onto an SD card (or similar
|
||
medium) and installed on-device.
|
||
|
||
BUILDING WITH OLD NDK VERSIONS
|
||
|
||
Building Emacs with an old version of the Android NDK requires special
|
||
setup. This is because there is no separate C compiler binary for
|
||
each version of Android in those versions of the NDK.
|
||
|
||
Before running `configure', you must identify three variables:
|
||
|
||
- What kind of Android system you are building Emacs for.
|
||
|
||
- The minimum API version of Android you want to build Emacs for.
|
||
|
||
- The locations of the system root and include files for that
|
||
version of Android in the NDK.
|
||
|
||
That information must then be specified as arguments to the NDK C
|
||
compiler. For example:
|
||
|
||
./configure [...] \
|
||
ANDROID_CC="i686-linux-android-gcc \
|
||
--sysroot=/path/to/ndk/platforms/android-14/arch-x86/"
|
||
ANDROID_CFLAGS="-isystem /path/to/ndk/sysroot/usr/include \
|
||
-isystem /path/to/ndk/sysroot/usr/include/i686-linux-android \
|
||
-D__ANDROID_API__=14"
|
||
|
||
Where __ANDROID_API__ and the version identifier in
|
||
"platforms/android-14" defines the version of Android you are building
|
||
for, and the include directories specify the paths to the relevant
|
||
Android headers. In addition, it may be necessary to specify
|
||
"-gdwarf-2", due to a bug in the Android NDK.
|
||
|
||
Emacs is known to build for Android 2.2 (API version 8) or later, and
|
||
run on Android 2.3 or later. It is supposed to run on Android 2.2 as
|
||
well.
|
||
|
||
|
||
This file is part of GNU Emacs.
|
||
|
||
GNU Emacs is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation, either version 3 of the License, or
|
||
(at your option) any later version.
|
||
|
||
GNU Emacs is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|